2.0.20 • Published 5 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
5 years ago
2.0.19
5 years ago
2.0.18
5 years ago
2.0.17
6 years ago
2.0.16
6 years ago
2.0.15
6 years ago
2.0.14
6 years ago
2.0.13
6 years ago
2.0.12
6 years ago
2.0.11
6 years ago
2.0.10
6 years ago
2.0.9
6 years ago
2.0.8
6 years ago
2.0.7
6 years ago
2.0.6
6 years ago
2.0.5
6 years ago
2.0.4
6 years ago
2.0.3
6 years ago
2.0.2
6 years ago
2.0.1
6 years ago
2.0.0
7 years ago
1.0.5
7 years ago
1.0.4
7 years ago
1.0.3
7 years ago
1.0.2
7 years ago
1.0.1
7 years ago
1.0.0
7 years ago