-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(add InlineNotice to InfoBoxItem)
- Loading branch information
1 parent
464e901
commit 80a8cb5
Showing
6 changed files
with
90 additions
and
5 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
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,51 @@ | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
import Container from "../app/components/Container"; | ||
import InfoBoxItem, { InfoBoxItemProps } from "~/components/InfoBoxItem"; | ||
|
||
const meta = { | ||
title: "Content/InfoBoxItem", | ||
component: InfoBoxItem, | ||
parameters: { | ||
layout: "fullscreen", | ||
}, | ||
tags: ["autodocs"], | ||
} satisfies Meta<typeof InfoBoxItem>; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof meta>; | ||
|
||
const defaultArgs: InfoBoxItemProps = { | ||
identifier: "default-info-box-item-id", | ||
headline: { | ||
text: "InfoBoxItem Header", | ||
}, | ||
content: "InfoBoxItem Content", | ||
}; | ||
|
||
export const Default: Story = { | ||
args: defaultArgs, | ||
}; | ||
|
||
export const InContainer: Story = { | ||
decorators: (Story) => ( | ||
<Container> | ||
<Story /> | ||
</Container> | ||
), | ||
args: defaultArgs, | ||
}; | ||
|
||
export const WithInlineNotice: Story = { | ||
args: { | ||
...defaultArgs, | ||
inlineNotices: [ | ||
{ | ||
title: "InlineNotice Title", | ||
tagName: "h3", | ||
look: "tips", | ||
content: "Lorem **ipsum**\n\n* Lorem ipsum\n* Lorem ipsum", | ||
}, | ||
], | ||
}, | ||
}; |