npm.io
1.0.2 • Published 8 years ago

react-prop-toggle

Licence
MIT
Version
1.0.2
Deps
0
Size
210 kB
Vulns
0
Weekly
0

React Prop Toggle

A safe, declarative way to influence the styles and attributes of nodes outside your app's tree.

By storing the initial values of the target node when mounting react-prop-toggle is able to safely return styles and attributes when unmounted.

<PropToggle
  isActive={this.state.someCondition}
  attributes={{ 'data-variant': 'true' }}
  styles={{ background: 'red' }}
/>

Keywords