-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(forms): add
inheritLabel
prop to value components
- Loading branch information
1 parent
eabc583
commit 5ea2d8a
Showing
9 changed files
with
186 additions
and
14 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
22 changes: 11 additions & 11 deletions
22
packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/Value/Examples.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 |
---|---|---|
@@ -1,28 +1,28 @@ | ||
import React from 'react' | ||
import ComponentBox from '../../../../../shared/tags/ComponentBox' | ||
import { Value } from '@dnb/eufemia/src/extensions/forms' | ||
import { Form, Value } from '@dnb/eufemia/src/extensions/forms' | ||
|
||
export const SummaryList = () => { | ||
export const Composition = () => { | ||
return ( | ||
<ComponentBox> | ||
<Value.SummaryList> | ||
<Value.String label="Foo" value="value" /> | ||
<Value.Number label="Bar" value={123} /> | ||
<Value.Composition label="Label"> | ||
<Value.String value="value" /> | ||
<Value.Number value={123} /> | ||
</Value.Composition> | ||
</Value.SummaryList> | ||
</ComponentBox> | ||
) | ||
} | ||
|
||
export const Composition = () => { | ||
export const InheritLabel = () => { | ||
return ( | ||
<ComponentBox> | ||
<Value.SummaryList> | ||
<Value.String label="Foo" value="value" /> | ||
<Value.Composition label="Label"> | ||
<Value.String value="value" /> | ||
<Value.Number value={123} /> | ||
</Value.Composition> | ||
</Value.SummaryList> | ||
<Form.Handler data={{ myPath: 'my value' }}> | ||
<Value.String path="/myPath" label="Foo" /> | ||
<Value.String path="/myPath" inheritLabel /> | ||
</Form.Handler> | ||
</ComponentBox> | ||
) | ||
} |
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
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