From c680f50b7574ae769421fc29dc89d1010ac4276f Mon Sep 17 00:00:00 2001 From: Pujan Date: Mon, 24 Apr 2023 23:14:46 +0530 Subject: [PATCH 1/2] removed height from menuitem right icon --- src/styles/styles.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/styles/styles.js b/src/styles/styles.js index 0579dd7438f6..4b4c5e590272 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -1221,7 +1221,6 @@ const styles = { popoverMenuIcon: { width: variables.componentSizeNormal, - height: variables.componentSizeNormal, justifyContent: 'center', alignItems: 'center', }, From d5ab364d75c044dff6ec211eb7f79ffeac9d8ed3 Mon Sep 17 00:00:00 2001 From: Pujan Date: Tue, 25 Apr 2023 17:50:37 +0530 Subject: [PATCH 2/2] menu item stories added --- src/stories/MenuItem.stories.js | 95 +++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) diff --git a/src/stories/MenuItem.stories.js b/src/stories/MenuItem.stories.js index c32790316805..d5e0b5727f2c 100644 --- a/src/stories/MenuItem.stories.js +++ b/src/stories/MenuItem.stories.js @@ -20,16 +20,111 @@ const Template = args => ; // See: https://storybook.js.org/docs/react/writing-stories/introduction#using-args const Default = Template.bind({}); Default.args = { + title: 'Alberta Bobbeth Charleson', + icon: Chase, + iconHeight: variables.iconSizeExtraLarge, + iconWidth: variables.iconSizeExtraLarge, +}; + +const Description = Template.bind({}); +Description.args = { + title: 'Alberta Bobbeth Charleson', + description: 'Account ending in 1111', + icon: Chase, + iconHeight: variables.iconSizeExtraLarge, + iconWidth: variables.iconSizeExtraLarge, +}; + +const RightIcon = Template.bind({}); +RightIcon.args = { + title: 'Alberta Bobbeth Charleson', + icon: Chase, + iconHeight: variables.iconSizeExtraLarge, + iconWidth: variables.iconSizeExtraLarge, + shouldShowRightIcon: true, +}; + +const RightIconAndDescription = Template.bind({}); +RightIconAndDescription.args = { + title: 'Alberta Bobbeth Charleson', + description: 'Account ending in 1111', + icon: Chase, + iconHeight: variables.iconSizeExtraLarge, + iconWidth: variables.iconSizeExtraLarge, + shouldShowRightIcon: true, +}; + +const Selected = Template.bind({}); +Selected.args = { title: 'Alberta Bobbeth Charleson', description: 'Account ending in 1111', + icon: Chase, + iconHeight: variables.iconSizeExtraLarge, + iconWidth: variables.iconSizeExtraLarge, shouldShowSelectedState: true, isSelected: true, +}; + +const BadgeText = Template.bind({}); +BadgeText.args = { + title: 'Alberta Bobbeth Charleson', + icon: Chase, + iconHeight: variables.iconSizeExtraLarge, + iconWidth: variables.iconSizeExtraLarge, + shouldShowRightIcon: true, + badgeText: '$0.00', +}; + +const Focused = Template.bind({}); +Focused.args = { + title: 'Alberta Bobbeth Charleson', + icon: Chase, + iconHeight: variables.iconSizeExtraLarge, + iconWidth: variables.iconSizeExtraLarge, + shouldShowRightIcon: true, + focused: true, +}; + +const Disabled = Template.bind({}); +Disabled.args = { + title: 'Alberta Bobbeth Charleson', + icon: Chase, + iconHeight: variables.iconSizeExtraLarge, + iconWidth: variables.iconSizeExtraLarge, + shouldShowRightIcon: true, + disabled: true, +}; + +const BrickRoadIndicatorSuccess = Template.bind({}); +BrickRoadIndicatorSuccess.args = { + title: 'Alberta Bobbeth Charleson', + icon: Chase, + iconHeight: variables.iconSizeExtraLarge, + iconWidth: variables.iconSizeExtraLarge, + shouldShowRightIcon: true, + brickRoadIndicator: 'success', +}; + +const BrickRoadIndicatorFailure = Template.bind({}); +BrickRoadIndicatorFailure.args = { + title: 'Alberta Bobbeth Charleson', icon: Chase, iconHeight: variables.iconSizeExtraLarge, iconWidth: variables.iconSizeExtraLarge, + shouldShowRightIcon: true, + brickRoadIndicator: 'error', }; export default story; export { Default, + Description, + RightIcon, + RightIconAndDescription, + Selected, + BadgeText, + Focused, + Disabled, + BrickRoadIndicatorSuccess, + BrickRoadIndicatorFailure, };