import React from "react"; import { IButtonProps, MaybeElement, Button, IconName, } from "@blueprintjs/core"; import styled, { css } from "styled-components"; import { ButtonStyle } from "widgets/ButtonWidget"; import { Theme, darkenHover, darkenActive } from "constants/DefaultTheme"; import _ from "lodash"; import { ComponentProps } from "components/designSystems/appsmith/BaseComponent"; const getButtonColorStyles = (props: { theme: Theme } & ButtonStyleProps) => { if (props.filled) return props.theme.colors.textOnDarkBG; if (props.accent) { if (props.accent === "secondary") { return props.theme.colors.OXFORD_BLUE; } return props.theme.colors[props.accent]; } }; const ButtonColorStyles = css` color: ${getButtonColorStyles}; svg { fill: ${getButtonColorStyles}; } `; const ButtonWrapper = styled((props: ButtonStyleProps & IButtonProps) => (