From 1492a800ba0167a2e45b595ad6e111723d1d61be Mon Sep 17 00:00:00 2001 From: Driss Chelouati Date: Wed, 6 Dec 2023 23:24:30 +0100 Subject: [PATCH] feat(Dropdown): config redesign and implementation --- .../components/dropdown/dropdown.component.ts | 14 +- .../components/dropdown/dropdown.config.ts | 202 ++++++++++-------- .../components/dropdown/dropdown.stories.ts | 146 ++++++------- .../components/dropdown/dropdown.types.ts | 4 +- .../components/dropdown/dropdown.variants.ts | 12 +- src/plugins/components/dropdown/index.ts | 135 ++++++++---- 6 files changed, 304 insertions(+), 209 deletions(-) diff --git a/src/plugins/components/dropdown/dropdown.component.ts b/src/plugins/components/dropdown/dropdown.component.ts index 1f14487..adc2c3c 100644 --- a/src/plugins/components/dropdown/dropdown.component.ts +++ b/src/plugins/components/dropdown/dropdown.component.ts @@ -13,8 +13,8 @@ export const Dropdown = ({ label, headerLabel, buttonColor, - flavor = 'button', - shape = 'rounded', + variant = 'button', + rounded = 'sm', orientation = 'start', color = 'white', size = 'lg', @@ -35,10 +35,10 @@ export const Dropdown = ({ ${spread(attrs)} >
- ${flavor === 'button' + ${variant === 'button' ? html` ${Button({ - shape: shape, + rounded: rounded, color: buttonColor, children: html` ${label} @@ -65,7 +65,7 @@ export const Dropdown = ({ })} ` : ''} - ${flavor === 'context' + ${variant === 'context' ? html`