2.0.20 • Published 5 years ago

the-section v2.0.20

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

the-section

Build Status npm Version JS Standard

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

NameTypeDescriptionDefault
headingnodeHeading component
onTogglefuncCallback when toggle() => null
openboolOpen when mountedfalse

TheSection

Section of the-components

Props

NameTypeDescriptionDefault
spinningboolfalse
role'region'

TheSectionStyle

Style for TheSection

Props

NameTypeDescriptionDefault
optionsobjectStyle 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