Skip to content

Commit

Permalink
Update demos
Browse files Browse the repository at this point in the history
  • Loading branch information
mj12albert committed Feb 20, 2025
1 parent 28d6df4 commit 3288348
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/src/app/(private)/experiments/toolbar/basic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const settingsMetadata: SettingsMetadata<Settings> = {
toolbarDisabled: {
type: 'boolean',
label: 'Everything disabled',
default: true,
default: false,
},
};

Expand Down
19 changes: 18 additions & 1 deletion docs/src/app/(private)/experiments/toolbar/triggers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,18 @@ export const settingsMetadata: SettingsMetadata<Settings> = {
type: 'boolean',
label: 'Dialog disabled',
},
interactivePopoverDisabled: {
type: 'boolean',
label: 'Popover (interactive) disabled',
},
popoverDisabled: {
type: 'boolean',
label: 'Popover disabled',
},
alertDialogDisabled: {
type: 'boolean',
label: 'Alert Dialog disabled',
},
switchDisabled: {
type: 'boolean',
label: 'Switch disabled',
Expand Down Expand Up @@ -134,6 +146,7 @@ export default function App() {
),
key: 'comment-dialog',
label: 'Add a comment',
disabled: settings.dialogDisabled || settings.toolbarDisabled,
})}

<Dialog.Portal keepMounted>
Expand Down Expand Up @@ -170,6 +183,8 @@ export default function App() {
),
key: 'rgb-color-picker',
label: 'RGB color picker',
disabled:
settings.interactivePopoverDisabled || settings.toolbarDisabled,
})}

<Tooltip.Portal>
Expand Down Expand Up @@ -223,6 +238,7 @@ export default function App() {
),
key: 'notifications',
label: 'Notifications',
disabled: settings.popoverDisabled || settings.toolbarDisabled,
})}

<Popover.Portal>
Expand Down Expand Up @@ -253,6 +269,7 @@ export default function App() {
),
key: 'delete',
label: 'Delete',
disabled: settings.alertDialogDisabled || settings.toolbarDisabled,
})}

<AlertDialog.Portal keepMounted>
Expand Down Expand Up @@ -282,7 +299,7 @@ export default function App() {
<Toolbar.Separator className={styles.demo.Separator} />

<Toolbar.Button
disabled={settings.switchDisabled}
disabled={settings.switchDisabled || settings.toolbarDisabled}
className={classNames(
styles.toolbar.Toggle,
styles.demo.Toggle,
Expand Down

0 comments on commit 3288348

Please sign in to comment.