From c365f857b0d291a29553941f037d9f265b759f3a Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Sun, 16 Apr 2023 03:51:55 -0700 Subject: [PATCH] Extract delete team alert into a file Also, to support this: * Added `Destructive` class to Button * Added `primaryActionClassName` prop to Alert --- components/common/Alert/index.scss | 1 + components/common/Alert/index.tsx | 7 +++- components/common/Button/index.scss | 9 +++++ components/dialogs/DeleteTeamAlert/index.tsx | 35 ++++++++++++++++++++ 4 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 components/dialogs/DeleteTeamAlert/index.tsx diff --git a/components/common/Alert/index.scss b/components/common/Alert/index.scss index aba79f93..536edae8 100644 --- a/components/common/Alert/index.scss +++ b/components/common/Alert/index.scss @@ -30,6 +30,7 @@ .description { font-size: $font-regular; line-height: 1.4; + white-space: pre-line; strong { font-weight: $bold; diff --git a/components/common/Alert/index.tsx b/components/common/Alert/index.tsx index dc6d49c9..c6a34b48 100644 --- a/components/common/Alert/index.tsx +++ b/components/common/Alert/index.tsx @@ -12,6 +12,7 @@ interface Props { message: string | React.ReactNode primaryAction?: () => void primaryActionText?: string + primaryActionClassName?: string cancelAction: () => void cancelActionText: string } @@ -22,7 +23,10 @@ const Alert = (props: Props) => {
- + {props.title ? ( {props.title} ) : ( @@ -42,6 +46,7 @@ const Alert = (props: Props) => { {props.primaryAction ? (