-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
creating Text and Heading components
- Loading branch information
1 parent
754f88b
commit 53b0c67
Showing
14 changed files
with
661 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { Heading, HeadingProps } from '@ignite-ui/react'; | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
|
||
export default { | ||
title: 'Typography/Heading', | ||
component: Heading, | ||
args: { | ||
children: | ||
'Lorem ipsum, dolor sit amet consectetur adipisicing elit. Quaerat, nisi suscipit. Placeat sapiente, amet, laborum facere sed at illo explicabo obcaecati necessitatibus cumque similique voluptate fuga quod nemo perspiciatis eveniet?', | ||
}, | ||
} as Meta<HeadingProps>; | ||
|
||
export const Primary: StoryObj<HeadingProps> = {}; | ||
|
||
export const CustomTag: StoryObj<HeadingProps> = { | ||
args: { | ||
children: 'H1 Heading', | ||
as: 'h1', | ||
}, | ||
parameters: { | ||
docs: { | ||
description: { | ||
story: | ||
'By default, the Heading component is an h2, but it can be used as any other heading tag by passing the desired heading tag to the as props', | ||
}, | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { Text, TextProps } from '@ignite-ui/react'; | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
|
||
export default { | ||
title: 'Typography/Text', | ||
component: Text, | ||
args: { | ||
children: | ||
'Lorem ipsum, dolor sit amet consectetur adipisicing elit. Quaerat, nisi suscipit. Placeat sapiente, amet, laborum facere sed at illo explicabo obcaecati necessitatibus cumque similique voluptate fuga quod nemo perspiciatis eveniet?', | ||
}, | ||
} as Meta<TextProps>; | ||
|
||
export const Primary: StoryObj<TextProps> = {}; | ||
|
||
export const CustomTag: StoryObj<TextProps> = { | ||
args: { | ||
children: 'Strong text', | ||
as: 'strong', | ||
}, | ||
}; |
Oops, something went wrong.