-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
92 additions
and
0 deletions.
There are no files selected for viewing
92 changes: 92 additions & 0 deletions
92
packages/dnb-eufemia/src/components/card/stories/Card.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,92 @@ | ||
/** | ||
* @dnb/eufemia Component Story | ||
* | ||
*/ | ||
|
||
import React from 'react' | ||
|
||
import { Field } from '../../../extensions/forms' | ||
import { Card, Flex } from '../../' | ||
import { Wrapper, Box } from 'storybook-utils/helpers' | ||
|
||
export default { | ||
title: 'Eufemia/Components/Card', | ||
} | ||
|
||
const AllFormFields = () => { | ||
return ( | ||
<> | ||
<Field.NationalIdentityNumber | ||
path="/ssn" | ||
label="NationalIdentityNumber" | ||
/> | ||
<Field.Email path="/email" label="Email" /> | ||
<Field.PhoneNumber path="/phone" label="PhoneNumber" /> | ||
<Field.BankAccountNumber | ||
path="/bankaccount" | ||
label="BankAccountNumber" | ||
/> | ||
<Field.Boolean path="/boolean" label="Boolean" /> | ||
<Field.Currency path="/currency" label="Currency" /> | ||
<Field.Date path="/data" label="Date" /> | ||
<Field.NationalIdentityNumber | ||
path="/national" | ||
label="NationalIdentityNumber" | ||
/> | ||
<Field.Number path="/number" label="Number" /> | ||
<Field.Option path="/option" label="Option" /> | ||
<Field.OrganizationNumber path="/org" label="OrganizationNumber" /> | ||
<Field.PostalCodeAndCity path="/postal" label="PostalCodeAndCity" /> | ||
<Field.SelectCountry path="/selectcountry" label="SelectCountry" /> | ||
<Field.Selection path="/selection" label="Selection" /> | ||
<Field.String path="/string" label="String" /> | ||
<Field.Toggle | ||
path="/toggle" | ||
valueOn="checked" | ||
valueOff="unchecked" | ||
label="Toggle" | ||
/> | ||
</> | ||
) | ||
} | ||
|
||
export const CardSandbox = () => { | ||
return ( | ||
<Wrapper> | ||
<Box> | ||
<Card> | ||
<AllFormFields /> | ||
</Card> | ||
</Box> | ||
<Box> | ||
<Card direction="horizontal"> | ||
<AllFormFields /> | ||
</Card> | ||
</Box> | ||
<Box> | ||
<Card direction="vertical"> | ||
<AllFormFields /> | ||
</Card> | ||
</Box> | ||
<Box> | ||
<Card> | ||
<Flex.Horizontal> | ||
<AllFormFields /> | ||
</Flex.Horizontal> | ||
</Card> | ||
</Box> | ||
<Box> | ||
<Card> | ||
<Flex.Vertical> | ||
<AllFormFields /> | ||
</Flex.Vertical> | ||
</Card> | ||
</Box> | ||
<Box> | ||
<Card stack> | ||
<AllFormFields /> | ||
</Card> | ||
</Box> | ||
</Wrapper> | ||
) | ||
} |