UNPKG

1.32 kBJavaScriptView Raw
1import "core-js/modules/es.object.assign.js";
2import React from 'react';
3import { SectionRow } from './SectionRow';
4import { TableWrapper } from './ArgsTable';
5import { ResetWrapper } from '../../typography/DocumentFormatting';
6export default {
7 component: SectionRow,
8 title: 'Docs/SectionRow',
9 decorators: [function (getStory) {
10 return /*#__PURE__*/React.createElement(ResetWrapper, null, /*#__PURE__*/React.createElement(TableWrapper, null, /*#__PURE__*/React.createElement("tbody", null, getStory())));
11 }]
12};
13
14var Template = function Template(args) {
15 return /*#__PURE__*/React.createElement(SectionRow, args);
16};
17
18Template.displayName = "Template";
19export var Section = Template.bind({});
20Section.args = {
21 level: 'section',
22 label: 'Props'
23};
24export var Subsection = Template.bind({});
25Subsection.args = {
26 level: 'subsection',
27 label: 'HTMLElement'
28};
29export var Collapsed = Template.bind({});
30Collapsed.args = Object.assign({}, Section.args, {
31 initialExpanded: false
32});
33export var Nested = function Nested() {
34 return /*#__PURE__*/React.createElement(SectionRow, Section.args, /*#__PURE__*/React.createElement(SectionRow, Subsection.args, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
35 colSpan: 2
36 }, "Some content"))));
37};
38Nested.displayName = "Nested";
\No newline at end of file