From 400ab2cc28f04ae5ab8bdb3e954c99b39df6a974 Mon Sep 17 00:00:00 2001 From: jordankoschei-okta Date: Mon, 17 Jul 2023 19:52:01 -0400 Subject: [PATCH] refactor: change Dialog footer props --- packages/odyssey-react-mui/src/Dialog.tsx | 24 +++++++++---------- .../odyssey-mui/Dialog/Dialog.stories.tsx | 12 +++++----- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/odyssey-react-mui/src/Dialog.tsx b/packages/odyssey-react-mui/src/Dialog.tsx index 0e110c7f01..c20c182303 100644 --- a/packages/odyssey-react-mui/src/Dialog.tsx +++ b/packages/odyssey-react-mui/src/Dialog.tsx @@ -32,15 +32,15 @@ export type DialogProps = { /** * An optional Button object to be situated in the Dialog footer. Should almost always be of variant `primary`. */ - callToActionPrimaryComponent?: ReactElement; + callToActionFirstComponent?: ReactElement; /** * An optional Button object to be situated in the Dialog footer, alongside the `callToActionPrimaryComponent`. */ - callToActionSecondaryComponent?: ReactElement; + callToActionSecondComponent?: ReactElement; /** * An optional Button object to be situated in the Dialog footer, alongside the other two `callToAction` components. */ - callToActionTertiaryComponent?: ReactElement; + callToActionLastComponent?: ReactElement; /** * The content of the Dialog. May be a `string` or any other `ReactNode` or array of `ReactNode`s. */ @@ -61,9 +61,9 @@ export type DialogProps = { }; const Dialog = ({ - callToActionPrimaryComponent, - callToActionSecondaryComponent, - callToActionTertiaryComponent, + callToActionFirstComponent, + callToActionSecondComponent, + callToActionLastComponent, children, isOpen, onClose, @@ -119,13 +119,13 @@ const Dialog = ({ {content} - {(callToActionPrimaryComponent || - callToActionSecondaryComponent || - callToActionTertiaryComponent) && ( + {(callToActionFirstComponent || + callToActionSecondComponent || + callToActionLastComponent) && ( - {callToActionTertiaryComponent} - {callToActionSecondaryComponent} - {callToActionPrimaryComponent} + {callToActionLastComponent} + {callToActionSecondComponent} + {callToActionFirstComponent} )} diff --git a/packages/odyssey-storybook/src/components/odyssey-mui/Dialog/Dialog.stories.tsx b/packages/odyssey-storybook/src/components/odyssey-mui/Dialog/Dialog.stories.tsx index 41b3a7b63c..c88f9ff37a 100644 --- a/packages/odyssey-storybook/src/components/odyssey-mui/Dialog/Dialog.stories.tsx +++ b/packages/odyssey-storybook/src/components/odyssey-mui/Dialog/Dialog.stories.tsx @@ -27,7 +27,7 @@ const storybookMeta: Meta = { title: "MUI Components/Dialog", component: Dialog, argTypes: { - callToActionPrimaryComponent: { + callToActionFirstComponent: { control: null, description: "An optional Button object to be situated in the Dialog footer. Should almost always be of variant `primary`.", @@ -37,7 +37,7 @@ const storybookMeta: Meta = { }, }, }, - callToActionSecondaryComponent: { + callToActionSecondComponent: { control: null, description: "An optional Button object to be situated in the Dialog footer, alongside the `callToActionPrimaryComponent`.", @@ -47,7 +47,7 @@ const storybookMeta: Meta = { }, }, }, - callToActionTertiaryComponent: { + callToActionLastComponent: { control: null, description: "An optional Button object to be situated in the Dialog footer, alongside the other two `callToAction` components.", @@ -127,17 +127,17 @@ const DefaultTemplate: StoryObj = {