react-inline-center
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

react-inline-center

npm version minzipped size module

Centering inline elements like magic:

  • No need to add the wrapper element
  • The child element (image, icon etc.) can be any size
  • Only align to the first line of adjacent text

Install

npm install react-inline-center

Demo

Usage

import InlineCenter from 'react-inline-center'

render(
  <>
    <Button>
      <InlineCenter>
        <MyIcon />
      </InlineCenter>
      label.
    </Button>
    <p>
      <InlineCenter>
        <image />
      </InlineCenter>
      text.
    </p>
  </>
)

Readme

Keywords

none

Package Sidebar

Install

npm i react-inline-center

Weekly Downloads

5,031

Version

1.0.3

License

MIT

Unpacked Size

3.78 kB

Total Files

6

Last publish

Collaborators

  • ambarli