-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/release/v24.0.0' into release/v2…
…4.0.0
- Loading branch information
Showing
6 changed files
with
139 additions
and
66 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
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
50 changes: 50 additions & 0 deletions
50
src/components/Typography/stories/HtmlContentBlock.stories.tsx
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,50 @@ | ||
import React from "react"; | ||
import LoremIpsum, { loremIpsum } from "react-lorem-ipsum"; | ||
import { Meta, StoryFn } from "@storybook/react"; | ||
|
||
import { HtmlContentBlock } from "../../../index"; | ||
|
||
const whiteSpaceSizeOptions = { | ||
control: "select", | ||
options: { | ||
"not set": undefined, | ||
tiny: "tiny", | ||
small: "small", | ||
regular: "regular", | ||
large: "large", | ||
xlarge: "xlarge", | ||
}, | ||
}; | ||
|
||
export default { | ||
title: "Components/Typography/HtmlContentBlock", | ||
component: HtmlContentBlock, | ||
argTypes: { | ||
children: { control: false }, | ||
}, | ||
} as Meta<typeof HtmlContentBlock>; | ||
|
||
const Template: StoryFn<typeof HtmlContentBlock> = (args) => <HtmlContentBlock {...args} />; | ||
|
||
const testContent = ( | ||
<> | ||
<LoremIpsum p={2} avgSentencesPerParagraph={4} random={false} /> | ||
<p> | ||
<strong> | ||
{loremIpsum({ | ||
p: 2, | ||
avgSentencesPerParagraph: 4, | ||
random: false, | ||
}) | ||
.toString() | ||
.replaceAll(" ", "")} | ||
</strong> | ||
</p> | ||
<LoremIpsum p={3} avgSentencesPerParagraph={5} random={false} /> | ||
</> | ||
); | ||
|
||
export const Default = Template.bind({}); | ||
Default.args = { | ||
children: testContent, | ||
}; |
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