Skip to content

Commit

Permalink
chore(IconSkeleton): move story to components
Browse files Browse the repository at this point in the history
  • Loading branch information
jnm2377 committed Feb 24, 2022
1 parent 3bfd5e7 commit 7036377
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 30 deletions.
30 changes: 0 additions & 30 deletions packages/react/src/components/Icon/Icon-story.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import React from 'react';
import { iconAdd, iconAddSolid, iconAddOutline } from 'carbon-icons';
import { withKnobs, select, text } from '@storybook/addon-knobs';
import Icon from '../Icon';
import IconSkeleton from '../Icon/Icon.Skeleton';

const icons = {
'Add (iconAdd from `carbon-icons`)': 'iconAdd',
Expand Down Expand Up @@ -49,20 +48,6 @@ const props = () => {
};
};

const propsSkeleton = {
style: {
margin: '50px',
},
};

const propsSkeleton2 = {
style: {
margin: '50px',
width: '24px',
height: '24px',
},
};

export default {
title: 'Deprecated/Icon',
component: Icon,
Expand All @@ -82,18 +67,3 @@ Default.parameters = {
`,
},
};

export const Skeleton = () => (
<div>
<IconSkeleton {...propsSkeleton} />
<IconSkeleton {...propsSkeleton2} />
</div>
);

Skeleton.parameters = {
info: {
text: `
Icons are used in the product to present common actions and commands. Modify the fill property to change the color of the icon. The name property defines which icon to display. For accessibility, provide a context-rich description with the description prop. For a full list of icon names, see https://www.carbondesignsystem.com/guidelines/iconography/library
`,
},
};
43 changes: 43 additions & 0 deletions packages/react/src/components/Icon/IconSkeleton-story.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/**
* Copyright IBM Corp. 2016, 2018
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/

import React from 'react';
import IconSkeleton from '../Icon/Icon.Skeleton';

const propsSkeleton = {
style: {
margin: '50px',
},
};

const propsSkeleton2 = {
style: {
margin: '50px',
width: '24px',
height: '24px',
},
};

export default {
title: 'Components/IconSkeleton',
component: IconSkeleton,
};

export const Default = () => (
<>
<IconSkeleton {...propsSkeleton} />
<IconSkeleton {...propsSkeleton2} />
</>
);

Default.parameters = {
info: {
text: `
Icons are used in the product to present common actions and commands. Modify the fill property to change the color of the icon. The name property defines which icon to display. For accessibility, provide a context-rich description with the description prop. For a full list of icon names, see https://www.carbondesignsystem.com/guidelines/iconography/library
`,
},
};

0 comments on commit 7036377

Please sign in to comment.