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