Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function MutatingSelect(props: any) {
const [value, setValue] = useKnob('text', 'value', 'Cookies');
const [label] = useKnob('text', 'label', 'Label');
const [enhanced] = useKnob('boolean', 'enhanced', false);
const [disabled] = useKnob('boolean', 'disabled', false);
const [options] = useKnob('array', 'options', [
'Cookies',
'Pizza',
'Icecream'
]);
return (
function SimpleDialogStory() {
const [open, setOpen] = useKnob('boolean', 'open', true);
const [title] = useKnob('text', 'title', 'This is a simple dialog');
const [body] = useKnob(
'text',
'body',
'You can pass the body prop, or anything you want as children.'
);
const [acceptLabel] = useKnob('text', 'acceptLabel', 'Accept');
const [cancelLabel] = useKnob('text', 'cancelLabel', 'Cancel');
return (
{
setOpen(false);
action('onClose')();
}}
acceptLabel={acceptLabel}
cancelLabel={cancelLabel}
/>
);
}
function MutatingSelect(props: any) {
const [value, setValue] = useKnob('text', 'value', 'Cookies');
const [label] = useKnob('text', 'label', 'Label');
const [enhanced] = useKnob('boolean', 'enhanced', false);
const [disabled] = useKnob('boolean', 'disabled', false);
const [options] = useKnob('array', 'options', [
'Cookies',
'Pizza',
'Icecream'
]);
return (
function SimpleDialogStory() {
const [open, setOpen] = useKnob('boolean', 'open', true);
const [title] = useKnob('text', 'title', 'This is a simple dialog');
const [body] = useKnob(
'text',
'body',
'You can pass the body prop, or anything you want as children.'
);
const [acceptLabel] = useKnob('text', 'acceptLabel', 'Accept');
const [cancelLabel] = useKnob('text', 'cancelLabel', 'Cancel');
return (
{
setOpen(false);
function MutatingSelect(props: any) {
const [value, setValue] = useKnob('text', 'value', 'Cookies');
const [label] = useKnob('text', 'label', 'Label');
const [enhanced] = useKnob('boolean', 'enhanced', false);
const [disabled] = useKnob('boolean', 'disabled', false);
const [options] = useKnob('array', 'options', [
'Cookies',
'Pizza',
'Icecream'
]);
return (
function MutatingSelect(props: any) {
const [value, setValue] = useKnob('text', 'value', 'Cookies');
const [label] = useKnob('text', 'label', 'Label');
const [enhanced] = useKnob('boolean', 'enhanced', false);
const [disabled] = useKnob('boolean', 'disabled', false);
const [options] = useKnob('array', 'options', [
'Cookies',
'Pizza',
'Icecream'
]);
return (
function SimpleDialogStory() {
const [open, setOpen] = useKnob('boolean', 'open', true);
const [title] = useKnob('text', 'title', 'This is a simple dialog');
const [body] = useKnob(
'text',
'body',
'You can pass the body prop, or anything you want as children.'
);
const [acceptLabel] = useKnob('text', 'acceptLabel', 'Accept');
const [cancelLabel] = useKnob('text', 'cancelLabel', 'Cancel');
return (
{
setOpen(false);
action('onClose')();
}}
acceptLabel={acceptLabel}
cancelLabel={cancelLabel}
/>
);
}
function MutatingSelect(props: any) {
const [value, setValue] = useKnob('text', 'value', 'Cookies');
const [label] = useKnob('text', 'label', 'Label');
const [enhanced] = useKnob('boolean', 'enhanced', false);
const [disabled] = useKnob('boolean', 'disabled', false);
const [options] = useKnob('array', 'options', [
'Cookies',
'Pizza',
'Icecream'
]);
return (
function SimpleDialogStory() {
const [open, setOpen] = useKnob('boolean', 'open', true);
const [title] = useKnob('text', 'title', 'This is a simple dialog');
const [body] = useKnob(
'text',
'body',
'You can pass the body prop, or anything you want as children.'
);
const [acceptLabel] = useKnob('text', 'acceptLabel', 'Accept');
const [cancelLabel] = useKnob('text', 'cancelLabel', 'Cancel');
return (
{
setOpen(false);
action('onClose')();
}}
function SimpleDialogStory() {
const [open, setOpen] = useKnob('boolean', 'open', true);
const [title] = useKnob('text', 'title', 'This is a simple dialog');
const [body] = useKnob(
'text',
'body',
'You can pass the body prop, or anything you want as children.'
);
const [acceptLabel] = useKnob('text', 'acceptLabel', 'Accept');
const [cancelLabel] = useKnob('text', 'cancelLabel', 'Cancel');
return (
{
setOpen(false);
action('onClose')();