Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.add("With saveButtonProps customization", () => (
<input label="First Name">
<input label="Last Name">
))
.add("extended style", () => (
<button>Do Something</button>
}
title="Do the thing?"
description="Once it's done, there's no way back."
actions={[
{
text: "Don't do",
onClick: cancel,
type: buttonTypes.NEUTRAL,
},
{
text: "Do it!",
onClick: confirm,
type: buttonTypes.PRIMARY,
},
]}
onRequestClose={cancel}
/>
);
};
return ;
.add("with two actions", () => (
<footer size="{buttonSizes.MEDIUM}">,
<button size="{buttonSizes.MEDIUM}" type="{buttonTypes.PRIMARY}">,
]}
helpImageSrc="https://crave-whatsgood-sandbox.imgix.net/businesses/32/inventory/8fae5d32-f6d4-47bb-8062-e4e85c47788b.png"
/>
))
.add("without link", () => (</button></footer>
.add("With cardProps, header and footer", () => {
return (
HEADER}
footer={
<div style="{{">
<button type="{buttonTypes.PRIMARY}">
</button></div>
}
cardProps={{ width: "400px", floating: false }}
>
{lipsum}
);
})
.add("With custom close button props", () => (
clearSelection={clearFunction}
title={count =>
count === 1 ? "1 fruit selected" : `${count} Fruits selected`
}
>
<div style="{{">
<button type="{buttonTypes.SECONDARY}"> setItems([...items, ...fruits])}
>
Add Fruits
</button>
<button type="{buttonTypes.PRIMARY}"> setItems(fruits)}
>
Reset Fruits
</button>
</div>
)}
>