Skip to content

Commit

Permalink
feat: Add divider line option for ConfigrSelect (BL-13095)
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenMcConnel committed Feb 22, 2024
1 parent 53dd42f commit 528e076
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/ContentPane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,9 @@ export const ConfigrSelect: React.FunctionComponent<
}
const labelToUse = o.label ?? o.value;
const valueToUse = o.value ?? o.label;
if (labelToUse?.startsWith('--')) {
return (<Divider key={labelToUse} />);
}
return (
<MenuItem value={valueToUse} key={labelToUse}>
{o.description ? (
Expand Down
1 change: 1 addition & 0 deletions src/stories/bloom.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ const BloomCollectionInner: React.FunctionComponent<{
options={[
{ label: 'Paper Saver', value: 'Paper Saver' },
{ label: 'Super Paper Saver', value: 'Super Paper Saver' },
{ label: '--', value: '' },
{
label: 'Traditional',
value: 'Traditional',
Expand Down

0 comments on commit 528e076

Please sign in to comment.