0.5.0 • Published 9 years ago

stylistic-elements v0.5.0

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

Stylistic Elements

A set of React components that make it easy to style elements using props.

For example:

import {Element} from 'stylistic-elements';

<Element
  tag="input"
  type="text"
  id="myElement"
  onClick={onClickHandler}
  marginTop={12}
  translateY={24}
/>

// Renders as:

<input
  type="text"
  id="myElement"
  onClick={onClickHandler}
  style={{
    marginTop: 12,
    transform: 'translate(0, 24px)',
  }}
/>

Available elements

  • Element: the most basic one, simply converts props into inline styles. I recommend using one of the higher-level components below instead.
  • ResetElement: like Element but resets some common user-agent styles to their defaults.
  • Block: a block-level element. Defaults to div.
  • Inline: an inline element. Defaults to span.
  • InlineBlock: an inline-block element. Defaults to a div with display: inline-block and vertical-align: middle.

Supported attributes

See stylistic for the list of supported attributes.

0.5.0

9 years ago

0.4.3

9 years ago

0.4.2

9 years ago

0.4.1

9 years ago

0.4.0

9 years ago

0.3.0

9 years ago

0.2.4

10 years ago

0.2.3

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago