Skip to content
This repository was archived by the owner on Nov 26, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion docs/BrandColors.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from 'react';
import type { Meta, StoryObj } from '@storybook/react';
import tokens from '../src/figma/tokens.json';
import { ColorSwatchGroup } from './components';
import { brandColor } from '../src/js';
import { ColorSwatchGroup, ColorSwatch } from './components';
import README from './BrandColors.mdx';

const meta: Meta<typeof ColorSwatchGroup> = {
Expand All @@ -22,3 +23,20 @@ export const DefaultStory: Story = {
render: () => <ColorSwatchGroup swatchData={tokens.global.brandColors} />,
name: 'Default',
};

export const JS: Story = {
render: () => (
<div
style={{
display: 'grid',
gap: '16px',
gridTemplateColumns: 'repeat(auto-fill, 300px)',
}}
>
{/* Mapping through each brand color and rendering a ColorSwatch component for it */}
{Object.entries(brandColor).map(([name, color]) => (
<ColorSwatch key={name} color={color} name={`brandColor.${name}`} />
))}
</div>
),
};
9 changes: 8 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
export { colors, typography, lightTheme, darkTheme, Theme } from './js';
export {
colors,
typography,
lightTheme,
darkTheme,
Theme,
brandColor,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Including brandColor export from root index. Changed formatting with extra export

} from './js';
Loading