0.0.7 • Published 6 years ago

react-centpn v0.0.7

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

react-centpn

npm npm Travis Codecov cdn

Simple react component to center children vertically.

Installation

yarn add react-centpn

Usage

import Center from 'react-centpn'

export default () =>
  <div {...{ style: { position: 'relative', height: '100%' } }}>
    <Center {...{ top: -20 }}>
      <div {...{ style: { height: 100 } }}></div>
    </Center>
  </div>

Props

top: number | string

Used as calc(50% - ${contentHeight / 2} + (props.top)).

props.top as number will be processed ${props.top}px.

License

MIT (http://opensource.org/licenses/MIT)

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago