From b91d4ff7e9d39d24d02950c489109ebaad7f0929 Mon Sep 17 00:00:00 2001 From: martalalik Date: Fri, 12 Aug 2022 12:22:19 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Add=20Examples?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Typography/Typography.docs.mdx | 19 ++- .../Typography/Typography.stories.tsx | 126 ++++++++++-------- 2 files changed, 85 insertions(+), 60 deletions(-) diff --git a/packages/eds-core-react/src/components/Typography/Typography.docs.mdx b/packages/eds-core-react/src/components/Typography/Typography.docs.mdx index 945507904d..e6aae4100b 100644 --- a/packages/eds-core-react/src/components/Typography/Typography.docs.mdx +++ b/packages/eds-core-react/src/components/Typography/Typography.docs.mdx @@ -45,4 +45,21 @@ import { Typography } from '@equinor/eds-core-react' Sample text ``` -## Examples \ No newline at end of file +## Examples + +### Colors + + + +### Custom + + + +### Lines + + + +### Link +Link used in body of text. + + \ No newline at end of file diff --git a/packages/eds-core-react/src/components/Typography/Typography.stories.tsx b/packages/eds-core-react/src/components/Typography/Typography.stories.tsx index 1bda3334b8..3a930de9f2 100644 --- a/packages/eds-core-react/src/components/Typography/Typography.stories.tsx +++ b/packages/eds-core-react/src/components/Typography/Typography.stories.tsx @@ -28,7 +28,7 @@ export default { decorators: [ (Story) => { return ( - + ) @@ -40,7 +40,7 @@ export const Introduction: Story = (args) => { return Sample text } -export const headings: Story = () => ( +export const Headings: Story = () => ( Heading 1 bold @@ -54,7 +54,7 @@ export const headings: Story = () => ( ) -export const paragraphs = (): JSX.Element => ( +export const Paragraphs = (): JSX.Element => ( Body short link @@ -236,8 +236,8 @@ GroupsOverview.parameters = { }, } -export const colors = (): JSX.Element => ( - +export const Colors = (): JSX.Element => ( + <> Primary Secondary Danger @@ -246,57 +246,62 @@ export const colors = (): JSX.Element => ( Disabled CSS currentColor CSS pink - + ) -export const custom = (): JSX.Element => ( - - - Navigation / Label - - - Navigation / Menu / Title - - - Table / Cell / Text - - - Table / Cell / Text / Medium - - - Table / Cell / Text / Bold - - - Table / Cell / Text / Bold / Link - - - - Heading 3 Bold - - - Ingress Bold - - - Custom token - - +export const Custom = (): JSX.Element => ( + <> +
+ + Navigation / Label + + + Navigation / Menu / Title + +
+
+ + Table / Cell / Text + + + Table / Cell / Text / Medium + + + Table / Cell / Text / Bold + + + Table / Cell / Text / Bold / Link + +
+
+ + Heading 3 Bold + + + Ingress Bold + + + Custom token + +
+ ) export const Lines = (): JSX.Element => ( - + <> Cupcake ipsum dolor sit amet caramels powder. Chocolate powder donut bonbon candy canes brownie donut wafer. Cake topping oat cake cheesecake. @@ -308,11 +313,11 @@ export const Lines = (): JSX.Element => ( lollipop cake. Jelly-o bonbon marshmallow powder carrot cake icing carrot cake. Cheesecake brownie jelly beans soufflé icing. - + ) export const Link: Story = () => ( - + <> Link @@ -336,11 +341,14 @@ export const Link: Story = () => ( marshmallow wafer marzipan. Sesame snaps wafer apple pie sweet roll chocolate bar fruitcake.
-
+ ) - -Link.parameters = { - docs: { - storyDescription: 'Link used in body of text', +Link.decorators = [ + (Story) => { + return ( + + + + ) }, -} +]