Skip to content

Commit

Permalink
feat(icon): updated to v7
Browse files Browse the repository at this point in the history
  • Loading branch information
IgnacioBecerra committed Dec 20, 2023
1 parent d6d2325 commit cbab490
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 144 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { Props } from '@storybook/addon-docs/blocks';
import { ArgsTable, Meta } from '@storybook/blocks';
import * as IconStories from './icon.stories';

<Meta of={IconStories} />

# Icon

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,33 +20,38 @@ import Add24 from '@carbon/web-components/es/icons/add/24';
// @ts-ignore
import Add32 from '@carbon/web-components/es/icons/add/32';

import storyDocs from './icon-story.mdx';
import storyDocs from './icon.mdx';

export const Default = () =>
html` ${Add16()} ${Add20()} ${Add24()} ${Add32()} `;

Default.storyName = 'Default';
export const Default = {
render: () => html` ${Add16()} ${Add20()} ${Add24()} ${Add32()} `
}

export const withCustomClass = () => html`

export const withCustomClass = {
name: 'With custom class',
render: () => html`
<style>
.test-class {
fill: #0062ff;
}
</style>
${Add16({ class: 'test-class' })} ${Add20({ class: 'test-class' })}
${Add24({ class: 'test-class' })} ${Add32({ class: 'test-class' })}
`;

withCustomClass.storyName = 'With custom class';
`
}

export const withAriaLabel = () => html`
export const withAriaLabel = {
name: 'With aria label',
render: () => html`
${Add16({ 'aria-label': 'add' })} ${Add20({ 'aria-label': 'add' })}
${Add24({ 'aria-label': 'add' })} ${Add32({ 'aria-label': 'add' })}
`;

withAriaLabel.storyName = 'With aria-label';
`
}

export const withTitle = () => html`
export const withTitle = {
name: 'With title',
render: () => html`
${Add16({
'aria-describedby': 'id-title-1',
// @ts-ignore
Expand All @@ -67,13 +72,16 @@ export const withTitle = () => html`
// @ts-ignore
children: svg`<title id="id-title-4">add</title>`,
})}
`;
`
}

withTitle.storyName = 'With title';

export default {
const meta = {
title: 'Components/Icon',
parameters: {
...storyDocs.parameters,
docs: {
page: storyDocs,
},
},
};

export default meta;

This file was deleted.

0 comments on commit cbab490

Please sign in to comment.