2.0.20 • Published 6 years ago
the-section v2.0.20
the-section
Section of the-components
Installation
$ npm install the-section --save
Usage
Live Demo is hosted on GitHub Page
'use strict'
import React from 'react'
import { TheSection, TheAccordionSection, TheSectionStyle } from 'the-section'
import { TheSpinStyle } from 'the-spin'
import { TheButtonStyle } from 'the-button'
class ExampleComponent extends React.PureComponent {
render () {
return (
<div>
<TheSectionStyle/>
<TheButtonStyle/>
<TheSpinStyle/>
<h3>Normal section</h3>
<TheSection>
<TheSection.Header>This is header</TheSection.Header>
<TheSection.Body>This is content</TheSection.Body>
</TheSection>
<br/>
<h3>Lined header section</h3>
<TheSection>
<TheSection.Header lined
actionText='edit'
actionIcon='fa fa-pencil'
onAction={() => console.log('Edit button pressed')}
>This is lined header</TheSection.Header>
<TheSection.Body>This is content</TheSection.Body>
</TheSection>
<h3>Spinning section</h3>
<TheSection spinning>
<TheSection.Header lined>This is lined header</TheSection.Header>
<TheSection.Body>This is content</TheSection.Body>
</TheSection>
<br/>
<TheAccordionSection heading='Try me!'>
<p>
This is the accordion body
</p>
</TheAccordionSection>
<br/>
<br/>
<br/>
</div>
)
}
}
export default ExampleComponent
Components
TheAccordionSection
Accordion section
Props
Name | Type | Description | Default |
---|---|---|---|
heading | node | Heading component |
|
onToggle | func | Callback when toggle | () => null |
open | bool | Open when mounted | false |
TheSection
Section of the-components
Props
Name | Type | Description | Default |
---|---|---|---|
spinning | bool | false | |
role | 'region' |
TheSectionStyle
Style for TheSection
Props
Name | Type | Description | Default |
---|---|---|---|
options | object | Style options | {} |
License
This software is released under the MIT License.
Links
2.0.20
6 years ago
2.0.19
6 years ago
2.0.18
6 years ago
2.0.17
7 years ago
2.0.16
7 years ago
2.0.15
7 years ago
2.0.14
7 years ago
2.0.13
7 years ago
2.0.12
7 years ago
2.0.11
7 years ago
2.0.10
7 years ago
2.0.9
7 years ago
2.0.8
7 years ago
2.0.7
7 years ago
2.0.6
7 years ago
2.0.5
7 years ago
2.0.4
7 years ago
2.0.3
7 years ago
2.0.2
7 years ago
2.0.1
7 years ago
2.0.0
8 years ago
1.0.5
8 years ago
1.0.4
8 years ago
1.0.3
8 years ago
1.0.2
8 years ago
1.0.1
8 years ago
1.0.0
8 years ago