Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
close();
};
return (
<div>
<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}
/>
</div>
);
};
return ;
const twoLinesDescription =
"Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Etiam porta sem malesuada magna mollis euismod.";
const imgSrc = "https://picsum.photos/200?image=0";
const primaryAction = {
text: "Primary Action",
onClick: action("onPrimaryActionClick"),
type: buttonTypes.SECONDARY,
icon: ,
};
const secondaryAction = {
text: "Secondary Action",
onClick: action("onSecondaryActionClick"),
type: buttonTypes.NEUTRAL,
};
storiesOf("EmptyState", module)
.add("Default", () => (
))
.add("Long Title, inside a container", () => (
<div style="{{">
</div>
))
.add("With image", () => (
import { storiesOf } from "@storybook/react";
import { buttonTypes } from "@crave/farmblocks-button";
import { MdAlert, MdQuestion } from "@crave/farmblocks-icon";
import { DialogModal, useModal } from ".";
const primaryAction = {
text: "Primary Action",
onClick: action("onPrimaryActionClick"),
type: buttonTypes.SECONDARY,
};
const secondaryAction = {
text: "Secondary Action",
onClick: action("onSecondaryActionClick"),
type: buttonTypes.NEUTRAL,
};
storiesOf("Modal/DialogModal", module)
.add("Image + two actions", () => (
))
.add("Icon + one action", () => (