UNPKG

@cimpress/react-components

Version:
10 lines 1.09 kB
import React from 'react'; import { Accordion, Button } from '@cimpress/react-components'; import IconBin from '@cimpress-technology/react-streamline-icons/lib/IconBin'; const AccordionDemo = () => (React.createElement("div", null, React.createElement(Accordion, { title: React.createElement("span", null, "I am a title"), className: "another-class" }, "I am accordion content!"), React.createElement(Accordion, { defaultOpen: true, title: "Another accordion" }, "I am an accordion who defaults to being open."), React.createElement(Accordion, { title: React.createElement("div", null, "A node title") }, "I am an accordion with a node title"), React.createElement(Accordion, { title: React.createElement("span", null, "I have action buttons"), className: "another-class", actions: React.createElement(Button, { variant: "anchor", size: "lg", icon: React.createElement(IconBin, { size: "lg" }), onClick: () => console.log('Action clicked') }) }, "I am an accordion who has additional actions in the title."))); export default AccordionDemo; //# sourceMappingURL=accordion.js.map