import { Button, Typography } from "@material-ui/core"; import { storiesOf } from "@storybook/react"; import { Field } from "@vivid-planet/comet-admin"; import { createFinalFormRte } from "@vivid-planet/comet-admin-rte"; import * as React from "react"; import { Form } from "react-final-form"; import { ContentFormat, defaultContent, makeApiOptions, rteOptions } from "./RteAllOptions"; const { RteField, RteReadOnly } = createFinalFormRte({ rteApiOptions: makeApiOptions, // see ./RteAllOptions for details rteOptions, // see ./RteAllOptions for details }); function Story() { const [submitedValue, setSubmittedValue] = React.useState<{ rteContent: any }>({ rteContent: defaultContent }); return (
{ // setSubmittedValue({ rteContent: values.rteContent }); }} render={({ handleSubmit }) => ( )} />
Readonly Component:
); } storiesOf("comet-admin-rte/field", module).add("Field, all options", () => );