Skip to content

Commit

Permalink
refactor: tidy up custom theme story (#10488)
Browse files Browse the repository at this point in the history
**Related Issue:** N/A

## Summary

This should help simplify updating component tokens a bit.
  • Loading branch information
jcfranco authored Oct 9, 2024
1 parent d5020f6 commit cfaa670
Showing 1 changed file with 23 additions and 34 deletions.
57 changes: 23 additions & 34 deletions packages/calcite-components/src/custom-theme.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,27 +121,32 @@ const kitchenSink = (args: Record<string, string>, useTestValues = false) =>
</div>
</div>`;

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,
},
};

Expand All @@ -152,23 +157,7 @@ export const themingInteractive = (args: Record<string, string>): 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,
);
Expand Down

0 comments on commit cfaa670

Please sign in to comment.