diff --git a/app/client/src/widgets/wds/WDSTableWidget/component/Constants.ts b/app/client/src/widgets/wds/WDSTableWidget/component/Constants.ts index 9a64bb2bd7b3..2cc91d20b432 100644 --- a/app/client/src/widgets/wds/WDSTableWidget/component/Constants.ts +++ b/app/client/src/widgets/wds/WDSTableWidget/component/Constants.ts @@ -156,7 +156,7 @@ export interface CellWrappingProperties { export interface ButtonCellProperties { buttonVariant: ButtonCellProps["buttonVariant"]; - buttonColor?: string; + buttonColor?: ButtonCellProps["buttonColor"]; buttonLabel?: string; isCompact?: boolean; iconName?: IconName; @@ -351,7 +351,7 @@ export interface ColumnProperties allowSameOptionsInNewRow?: boolean; newRowSelectOptions?: DropdownOption[]; buttonLabel?: string; - buttonColor?: string; + buttonColor?: ButtonCellProps["buttonColor"]; onClick?: string; dropdownOptions?: string; onOptionChange?: string; diff --git a/app/client/src/widgets/wds/WDSTableWidget/component/cellComponents/ButtonCell.tsx b/app/client/src/widgets/wds/WDSTableWidget/component/cellComponents/ButtonCell.tsx index 6596385c2353..c473734326c2 100644 --- a/app/client/src/widgets/wds/WDSTableWidget/component/cellComponents/ButtonCell.tsx +++ b/app/client/src/widgets/wds/WDSTableWidget/component/cellComponents/ButtonCell.tsx @@ -6,14 +6,19 @@ import type { BaseCellComponentProps } from "../Constants"; export interface ButtonCellProps { buttonLabel?: string; - cellColor?: "default" | keyof typeof COLORS; + buttonColor?: keyof typeof COLORS; buttonVariant?: ButtonProps["variant"]; onClick?: (onComplete: () => void) => void; isDisabled?: boolean; } function ButtonCell(props: ButtonCellProps & BaseCellComponentProps) { - const { buttonLabel, buttonVariant, cellColor, isDisabled } = props; + const { + buttonColor = "accent", + buttonLabel, + buttonVariant, + isDisabled, + } = props; const [isLoading, setIsLoading] = useState(false); const onComplete = () => { @@ -30,7 +35,7 @@ function ButtonCell(props: ButtonCellProps & BaseCellComponentProps) { return (