From 5178cd42221577e363062034d70af49a7f4a770c Mon Sep 17 00:00:00 2001 From: ClaraTschamon Date: Tue, 21 Apr 2026 16:12:21 +0200 Subject: [PATCH] feat(confirmaction): add confirmButtonTextColor property --- .../ConfirmAction/ConfirmAction.stories.tsx | 4 ++++ src/components/ConfirmAction/ConfirmAction.tsx | 12 ++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/components/ConfirmAction/ConfirmAction.stories.tsx b/src/components/ConfirmAction/ConfirmAction.stories.tsx index 5f402f1..f698e69 100644 --- a/src/components/ConfirmAction/ConfirmAction.stories.tsx +++ b/src/components/ConfirmAction/ConfirmAction.stories.tsx @@ -12,6 +12,9 @@ export default { cancelButton: { type: { name: 'string' } }, confirmButton: { type: { name: 'string' } }, confirmColorPalette: { options: ['primary', 'red'], control: { type: 'radio' } }, + confirmButtonTextColor: { + control: { type: 'text' }, + }, confirmLoading: { control: { type: 'boolean' } }, }, } as Meta; @@ -50,6 +53,7 @@ WithRedButton.args = { cancelButton: 'Cancel', confirmButton: 'Delete', confirmColorPalette: 'red', + confirmButtonTextColor: 'white', }; export const WithLoadingConfirmationButton = Template.bind({}); diff --git a/src/components/ConfirmAction/ConfirmAction.tsx b/src/components/ConfirmAction/ConfirmAction.tsx index f1a1fff..61d696e 100644 --- a/src/components/ConfirmAction/ConfirmAction.tsx +++ b/src/components/ConfirmAction/ConfirmAction.tsx @@ -1,6 +1,7 @@ import React, { ReactNode } from 'react'; import { BoemlyModal } from '../BoemlyModal'; -import { Button, Flex, Text } from '@chakra-ui/react'; +import { Button } from '../ui/button'; +import { Flex, Text } from '@chakra-ui/react'; export interface ConfirmActionProps { trigger: ReactNode; @@ -12,6 +13,7 @@ export interface ConfirmActionProps { title?: string; text?: string; confirmColorPalette?: 'primary' | 'red'; + confirmButtonTextColor?: string; confirmLoading?: boolean; } export const ConfirmAction: React.FC = ({ @@ -24,6 +26,7 @@ export const ConfirmAction: React.FC = ({ open, onOpenChange, confirmColorPalette = 'primary', + confirmButtonTextColor = 'black', confirmLoading = false, }: ConfirmActionProps) => ( = ({ -