Skip to content

Commit

Permalink
chore: adds toolbarVariant minimumOneItem demos
Browse files Browse the repository at this point in the history
  • Loading branch information
langz committed Sep 12, 2024
1 parent 75b53bb commit a81d62d
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -409,3 +409,33 @@ export const InitialOpen = () => {
</ComponentBox>
)
}

export const ToolbarVariantMiniumOneItemOneItem = () => {
return (
<ComponentBox hideCode>
<Iterate.Array value={['foo']}>
<Iterate.ViewContainer toolbarVariant="minimumOneItem">
View Content
</Iterate.ViewContainer>
<Iterate.EditContainer toolbarVariant="minimumOneItem">
Edit Content
</Iterate.EditContainer>
</Iterate.Array>
</ComponentBox>
)
}

export const ToolbarVariantMiniumOneItemTwoItems = () => {
return (
<ComponentBox hideCode>
<Iterate.Array value={['foo', 'bar']}>
<Iterate.ViewContainer toolbarVariant="minimumOneItem">
View Content
</Iterate.ViewContainer>
<Iterate.EditContainer toolbarVariant="minimumOneItem">
Edit Content
</Iterate.EditContainer>
</Iterate.Array>
</ComponentBox>
)
}
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
export { ViewAndEditContainer } from '../Array/Examples'
export {
ViewAndEditContainer,
ToolbarVariantMiniumOneItemOneItem,
ToolbarVariantMiniumOneItemTwoItems,
} from '../Array/Examples'
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,15 @@ import * as Examples from './Examples'
## Demos

<Examples.ViewAndEditContainer />

### Toolbar variant

#### Minimum one item

When having one item in the Iterate.Array:

<Examples.ToolbarVariantMiniumOneItemOneItem />

When having two items in the Iterate.Array:

<Examples.ToolbarVariantMiniumOneItemTwoItems />
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
export { ViewAndEditContainer } from '../Array/Examples'
export {
ViewAndEditContainer,
ToolbarVariantMiniumOneItemOneItem,
ToolbarVariantMiniumOneItemTwoItems,
} from '../Array/Examples'
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,15 @@ import * as Examples from './Examples'
## Demos

<Examples.ViewAndEditContainer />

### Toolbar variant

#### Minimum one item

When having one item in the Iterate.Array:

<Examples.ToolbarVariantMiniumOneItemOneItem />

When having two items in the Iterate.Array:

<Examples.ToolbarVariantMiniumOneItemTwoItems />

0 comments on commit a81d62d

Please sign in to comment.