diff --git a/modules/react/avatar/stories/stories.tsx b/modules/react/avatar/stories/stories.tsx index 9e3045a480..967a319f4e 100644 --- a/modules/react/avatar/stories/stories.tsx +++ b/modules/react/avatar/stories/stories.tsx @@ -61,13 +61,13 @@ storiesOf('Components/Indicators/Avatar', module) .add('Non-Square Image', () => (

Original Rectangle Image

- +

Using Object Fit on a Rectangle Image

- +

Original Square Image

- +

Using a Square Image

- +
)) .add('Lazy Loading', () => ( diff --git a/modules/react/icon/stories/Assets.stories.mdx b/modules/react/icon/stories/IconsList.stories.mdx similarity index 53% rename from modules/react/icon/stories/Assets.stories.mdx rename to modules/react/icon/stories/IconsList.stories.mdx index fb2760f7dc..ad756fc71a 100644 --- a/modules/react/icon/stories/Assets.stories.mdx +++ b/modules/react/icon/stories/IconsList.stories.mdx @@ -1,16 +1,11 @@ -import {SystemIconList} from './examples/IconList'; -import {AppletIconList} from './examples/AppletIconList'; -import {AccentIconList} from './examples/AccentIconList.tsx'; -import {Overview} from './examples/Overview'; -import {Images} from './examples/Image'; +import {SystemIconList} from './examples/IconsList/IconList'; +import {AppletIconList} from './examples/IconsList/AppletIconList'; +import {AccentIconList} from './examples/IconsList/AccentIconList'; +import {Overview} from './examples/Overview' - + -# Assets - -foo bar Assets are graphics which help communicate meaning or highlight areas of interaction to our -users. These may be presented individually or as part of a group with related information in -components and patterns. +## Overview @@ -34,7 +29,3 @@ System Icons are symbols used to convey simple actions and functions, they are t encountered in products and help communicate metaphors at a glance. - -## Images - - diff --git a/modules/react/icon/stories/Image.stories.mdx b/modules/react/icon/stories/Image.stories.mdx new file mode 100644 index 0000000000..01ee9bf4ca --- /dev/null +++ b/modules/react/icon/stories/Image.stories.mdx @@ -0,0 +1,8 @@ + +import {Basic} from './examples/Image/Basic'; + + + +## Images + + diff --git a/modules/react/icon/stories/examples/AccentIconList.tsx b/modules/react/icon/stories/examples/IconsList/AccentIconList.tsx similarity index 97% rename from modules/react/icon/stories/examples/AccentIconList.tsx rename to modules/react/icon/stories/examples/IconsList/AccentIconList.tsx index 06dfa1b238..7d728dadd7 100644 --- a/modules/react/icon/stories/examples/AccentIconList.tsx +++ b/modules/react/icon/stories/examples/IconsList/AccentIconList.tsx @@ -18,6 +18,8 @@ const styleOverrides = { }), iconGroupContainer: createStyles({ flexWrap: 'wrap', + maxHeight: 300, + overflowY: 'scroll', }), individualIconContainer: createStyles({ alignItems: 'center', diff --git a/modules/react/icon/stories/examples/AppletIconList.tsx b/modules/react/icon/stories/examples/IconsList/AppletIconList.tsx similarity index 97% rename from modules/react/icon/stories/examples/AppletIconList.tsx rename to modules/react/icon/stories/examples/IconsList/AppletIconList.tsx index 16b3f3624a..4d2c664b53 100644 --- a/modules/react/icon/stories/examples/AppletIconList.tsx +++ b/modules/react/icon/stories/examples/IconsList/AppletIconList.tsx @@ -18,6 +18,8 @@ const styleOverrides = { }), iconGroupContainer: createStyles({ flexWrap: 'wrap', + maxHeight: 300, + overflowY: 'scroll', }), individualIconContainer: createStyles({ alignItems: 'center', diff --git a/modules/react/icon/stories/examples/IconList.tsx b/modules/react/icon/stories/examples/IconsList/IconList.tsx similarity index 97% rename from modules/react/icon/stories/examples/IconList.tsx rename to modules/react/icon/stories/examples/IconsList/IconList.tsx index f7cc6265a2..d083ddece9 100644 --- a/modules/react/icon/stories/examples/IconList.tsx +++ b/modules/react/icon/stories/examples/IconsList/IconList.tsx @@ -18,6 +18,8 @@ const styleOverrides = { }), firstChildContainer: createStyles({ flexWrap: 'wrap', + maxHeight: 300, + overflowY: 'scroll', }), secondChildContainer: createStyles({ alignItems: 'center', diff --git a/modules/react/icon/stories/examples/Image.tsx b/modules/react/icon/stories/examples/Image.tsx deleted file mode 100644 index b7900eb90f..0000000000 --- a/modules/react/icon/stories/examples/Image.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import React from 'react'; -import {Flex} from '@workday/canvas-kit-react/layout'; -import {Image, Graphic} from '@workday/canvas-kit-react/icon'; -// import {badgeAchievementGraphic} from '@workday/canvas-graphics-web'; - -import {createStyles} from '@workday/canvas-kit-styling'; -import {system} from '@workday/canvas-tokens-web'; -import {CanvasGraphic, CanvasIconTypes} from '@workday/design-assets-types'; - -const styleOverrides = { - parentContainer: createStyles({ - flexDirection: 'column', - alignItems: 'center', - gap: system.space.x6, - }), -}; - -const graphicExample: CanvasGraphic = { - name: 'badgeAchievement', - type: CanvasIconTypes.Graphic, - svg: '', - filename: 'wd-graphic-badge-achievement.svg', - category: '', - tags: [], -}; - -export const Images = () => { - return ( - - - - - - ); -}; diff --git a/modules/react/icon/stories/examples/Image/Basic.tsx b/modules/react/icon/stories/examples/Image/Basic.tsx new file mode 100644 index 0000000000..bf6092f9da --- /dev/null +++ b/modules/react/icon/stories/examples/Image/Basic.tsx @@ -0,0 +1,19 @@ +import React from 'react'; +import {Flex} from '@workday/canvas-kit-react/layout'; +import {Image} from '@workday/canvas-kit-react/icon'; + +import {createStyles} from '@workday/canvas-kit-styling'; + +const styleOverrides = { + parentContainer: createStyles({ + maxHeight: 300, + }), +}; + +export const Basic = () => { + return ( + + + + ); +}; diff --git a/modules/react/icon/stories/stories.tsx b/modules/react/icon/stories/stories.tsx index 59c3281f39..3bcc9d12a1 100644 --- a/modules/react/icon/stories/stories.tsx +++ b/modules/react/icon/stories/stories.tsx @@ -19,7 +19,7 @@ const graphicExample: CanvasGraphic = { tags: [], }; -storiesOf('Tokens/Icon', module) +storiesOf('Images and Icons/Icon', module) .addParameters({component: AccentIcon}) .addParameters({ReadmePath: 'react/icon'}) .add('Accent Icon', () => ( @@ -41,7 +41,7 @@ storiesOf('Tokens/Icon', module) )); -storiesOf('Tokens/Icon', module) +storiesOf('Images and Icons/Icon', module) .addParameters({component: AppletIcon}) .add('Applet Icon', () => (
@@ -53,7 +53,7 @@ storiesOf('Tokens/Icon', module)
)); -storiesOf('Tokens/Icon', module) +storiesOf('Images and Icons/Icon', module) .addParameters({component: SystemIcon}) .add('System Icon', () => (
@@ -103,7 +103,7 @@ storiesOf('Tokens/Icon', module)
)); -storiesOf('Tokens/Icon', module) +storiesOf('Images and Icons/Icon', module) .addParameters({component: Graphic}) .add('Graphic', () => (