Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit 22450e7

Browse files
Add stories to test noOfLines, textDecor, isTRuncated in Text
1 parent 4e46fcc commit 22450e7

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

packages/chakra-ui-core/src/CText/CText.stories.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,32 @@ storiesOf('UI | Text', module)
108108
</div>
109109
`
110110
}))
111+
.add('with noOfLines', () => ({
112+
components: { CText },
113+
template: `
114+
<div style="width: 80vw">
115+
<div>This will not show more than 3 lines</div>
116+
<CText noOfLines="3" mb="2" borderWidth="1px" borderColor="red.200">
117+
Extra super duper long naruto heading in the village hidden in the leaves by the first Hokage who used to be friedns with Madara Uchiha but they went their separate ways because they could find a common understing around the definition of peace in the ninja world. Add text to make it long enough
118+
</CText>
119+
</div>
120+
`
121+
}))
122+
.add('with textDecor', () => ({
123+
components: { CText },
124+
template: `
125+
<div style="width: 80vw; padding-top: 20px;">
126+
<div>Some decorations:</div>
127+
<CText p="4" mb="2" borderWidth="1px" borderColor="red.200" textDecor="overline">
128+
Extra super duper long naruto heading in the village hidden in the leaves by the first Hokage who used to be friedns with Madara Uchiha but they went their separate ways because they could find a common understing around the definition of peace in the ninja world.
129+
</CText>
130+
<CText p="4" mb="2" borderWidth="1px" borderColor="blue.200" textDecor="line-through">
131+
Extra super duper long naruto heading in the village hidden in the leaves by the first Hokage who used to be friedns with Madara Uchiha but they went their separate ways because they could find a common understing around the definition of peace in the ninja world.
132+
</CText>
133+
<CText p="4" mb="2" borderWidth="1px" borderColor="green.200" textDecor="underline">
134+
Extra super duper long naruto heading in the village hidden in the leaves by the first Hokage who used to be friedns with Madara Uchiha but they went their separate ways because they could find a common understing around the definition of peace in the ninja world.
135+
</CText>
136+
</div>
137+
`
138+
}))
139+

0 commit comments

Comments
 (0)