Skip to content

Commit

Permalink
改行のStoryを追加
Browse files Browse the repository at this point in the history
  • Loading branch information
IttetsuSato committed Oct 30, 2024
1 parent b7b9bfb commit 41d5661
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions stories/definitionList/sp-definition-list.story.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,19 @@ import type { Meta, StoryObj } from "@storybook/web-components";
import "@sp-design/token/lib/speeda-tokens.css";
import { html } from "lit";

const DefinitionList = (termText: string, definitionText: string) => html`
<sp-definition-list>
<sp-definition-list-dt>${termText}</sp-definition-list-dt>
<sp-definition-list-dd>${definitionText}</sp-definition-list-dd>
<sp-definition-list-dt>${termText}</sp-definition-list-dt>
<sp-definition-list-dd>${definitionText}</sp-definition-list-dd>
</sp-definition-list>
`;

const meta: Meta = {
args: {
termText: "Term",
definitionText: "Definition",
},
render: ({ termText, definitionText }) =>
DefinitionList(termText, definitionText),
render: ({ termText, definitionText }) => html`
<sp-definition-list>
<sp-definition-list-dt>${termText}</sp-definition-list-dt>
<sp-definition-list-dd>${definitionText}</sp-definition-list-dd>
<sp-definition-list-dt>${termText}</sp-definition-list-dt>
<sp-definition-list-dd>${definitionText}</sp-definition-list-dd>
</sp-definition-list>
`,
};
export default meta;

Expand All @@ -35,3 +32,9 @@ export const OverflowWrap: Story = {
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
},
};

export const Break: Story = {
args: {
definitionText: html`break <br />break`,
},
};

0 comments on commit 41d5661

Please sign in to comment.