From 39a9c58953c770021eb1b8fd605a2f2881e9a5b9 Mon Sep 17 00:00:00 2001 From: JC Franco Date: Fri, 4 Oct 2024 13:34:35 -0700 Subject: [PATCH] refactor: tidy up custom theme story --- .../src/custom-theme.stories.ts | 57 ++++++++----------- 1 file changed, 23 insertions(+), 34 deletions(-) diff --git a/packages/calcite-components/src/custom-theme.stories.ts b/packages/calcite-components/src/custom-theme.stories.ts index 79d3a34c968..7a1aa0767eb 100644 --- a/packages/calcite-components/src/custom-theme.stories.ts +++ b/packages/calcite-components/src/custom-theme.stories.ts @@ -121,27 +121,32 @@ const kitchenSink = (args: Record, useTestValues = false) => `; +const componentTokens = { + ...globalTokens, + ...accordionTokens, + ...accordionItemTokens, + ...actionTokens, + ...actionBarTokens, + ...actionGroupTokens, + ...actionMenuTokens, + ...actionPadTokens, + ...avatarTokens, + ...cardTokens, + ...alertTokens, + ...chipTokens, + ...checkboxTokens, + ...handleTokens, + ...popoverTokens, + ...progressTokens, + ...inputTokens, + ...textAreaTokens, +}; + export default { title: "Theming/Custom Theme", args: { ...globalTokens, - ...accordionTokens, - ...accordionItemTokens, - ...actionTokens, - ...actionBarTokens, - ...actionGroupTokens, - ...actionMenuTokens, - ...actionPadTokens, - ...avatarTokens, - ...cardTokens, - ...alertTokens, - ...chipTokens, - ...checkboxTokens, - ...handleTokens, - ...popoverTokens, - ...progressTokens, - ...inputTokens, - ...textAreaTokens, + ...componentTokens, }, }; @@ -152,23 +157,7 @@ export const themingInteractive = (args: Record): string => { export const theming = (): string => { return kitchenSink( { - ...accordionTokens, - ...accordionItemTokens, - ...actionTokens, - ...actionBarTokens, - ...actionGroupTokens, - ...actionMenuTokens, - ...actionPadTokens, - ...avatarTokens, - ...cardTokens, - ...alertTokens, - ...chipTokens, - ...checkboxTokens, - ...handleTokens, - ...popoverTokens, - ...progressTokens, - ...inputTokens, - ...textAreaTokens, + ...componentTokens, }, true, );