Skip to content

Commit 118a904

Browse files
committed
chore: Legg til sippled card med action
1 parent f2bcc3f commit 118a904

File tree

1 file changed

+29
-3
lines changed

1 file changed

+29
-3
lines changed

packages/ffe-cards-react/src/StippledCard/StippledCard.stories.tsx

+29-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import React from 'react';
2-
import { StippledCard } from './StippledCard';
3-
import type { StoryObj, Meta } from '@storybook/react';
41
import { Icon } from '@sb1/ffe-icons-react';
2+
import type { Meta, StoryObj } from '@storybook/react';
3+
import React from 'react';
54
import utvalgte from './illustrations/utvalgte.svg';
5+
import { StippledCard } from './StippledCard';
66

77
const Custom: React.FC<React.ComponentProps<'div'>> = props => (
88
<div {...props}>
@@ -195,3 +195,29 @@ export const Condensed: Story = {
195195
</StippledCard>
196196
),
197197
};
198+
199+
export const WithCardAction: Story = {
200+
args: {
201+
as: 'div',
202+
},
203+
render: args => (
204+
<StippledCard {...args}>
205+
{({ CardName, Title, Subtext, Text, CardAction }) => (
206+
<>
207+
<CardName>CardName</CardName>
208+
<Title>
209+
<CardAction>Tittel</CardAction>
210+
</Title>
211+
<Subtext as="span">Subtext er grå</Subtext>
212+
<Text>
213+
Lorem ipsum dolor sit amet, consectetur adipiscing elit,
214+
sed do eiusmod tempor incididunt ut labore et dolore
215+
magna aliqua. Ut enim ad minim veniam, quis nostrud
216+
exercitation ullamco laboris nisi ut aliquip ex ea
217+
commodo consequat.
218+
</Text>
219+
</>
220+
)}
221+
</StippledCard>
222+
),
223+
};

0 commit comments

Comments
 (0)