Skip to content

Commit

Permalink
documentation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
snorrekim committed Nov 14, 2024
1 parent b2c5db8 commit 06d9686
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ const errorMessages = {

## DrawerList

- replace type `DrawerListDataObjectUnion` with `DrawerListDataArrayItem`
- replace type `DrawerListDataObject` with `DrawerListDataArrayObject`;
- replace type `DrawerListDataObjectUnion` with `DrawerListDataArrayItem`.
- replace type `DrawerListDataObject` with `DrawerListDataArrayObject`.

_February, 6. 2024_
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ With long list to make it scrollable and searchable

<DropdownDisabled />

Individual options can also be disabled
Individual options can also be disabled.

<DropdownDisabledOptions />

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import PropertiesTable from 'dnb-design-system-portal/src/shared/parts/PropertiesTable'
import { DrawerListItem } from '@dnb/eufemia/src/fragments/drawer-list/DrawerListDocs'

## Prop `data`
## The `data` property

The `data` can be structured in two main ways: as an object, or as an array. An array is preferred as it gives you the most options.
The `data` can be structured in two main ways: as an array, or as an object. An array is preferred as it gives you the most options.

### `data` as an array

Expand Down Expand Up @@ -72,7 +72,7 @@ const data = {
}

const onChange = ({ data, value }) => {
console.log(data) // returns an object representing the item:
console.log(data) // returns a generated object representing the item:
// {
// selectedKey: 'first',
// value: 'first',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,10 @@ export const DropdownDisabledOptions = () => (
{() => {
const Example = () => {
return (
<>
<Field.Selection label="Label text">
<Field.Option value="foo" title="Foo!" disabled />
<Field.Option value="bar" title="Baar!" />
</Field.Selection>
</>
<Field.Selection label="Label text">
<Field.Option value="foo" title="Foo!" disabled />
<Field.Option value="bar" title="Baar!" />
</Field.Selection>
)
}

Expand Down Expand Up @@ -453,12 +451,10 @@ export const RadioDisabledOptions = () => (
{() => {
const Example = () => {
return (
<>
<Field.Selection label="Label text" variant="radio">
<Field.Option value="foo" title="Foo!" disabled />
<Field.Option value="bar" title="Baar!" />
</Field.Selection>
</>
<Field.Selection label="Label text" variant="radio">
<Field.Option value="foo" title="Foo!" disabled />
<Field.Option value="bar" title="Baar!" />
</Field.Selection>
)
}

Expand Down Expand Up @@ -651,12 +647,10 @@ export const ButtonDisabledOptions = () => (
{() => {
const Example = () => {
return (
<>
<Field.Selection label="Label text" variant="button">
<Field.Option value="foo" title="Foo!" disabled />
<Field.Option value="bar" title="Baar!" />
</Field.Selection>
</>
<Field.Selection label="Label text" variant="button">
<Field.Option value="foo" title="Foo!" disabled />
<Field.Option value="bar" title="Baar!" />
</Field.Selection>
)
}

Expand Down

0 comments on commit 06d9686

Please sign in to comment.