property-controls

0.0.59 • Public • Published

property-controls

Installation

yarn add property-controls

Usage

import { ControlType, applyPropertyControls } from 'property-controls'
 
export const Component = ({ isTomato, ...props }) => (
  <h1
    {...props}
    style={{
      color: isTomato ? 'tomato' : 'inherit'
    }}
  />
)
 
applyPropertyControls(Component, {
  isTomato: {
    type: ControlType.Boolean,
    title: 'Tomato'
  }
})

Related

Readme

Keywords

none

Package Sidebar

Install

npm i property-controls

Weekly Downloads

4

Version

0.0.59

License

MIT

Unpacked Size

14.4 kB

Total Files

8

Last publish

Collaborators

  • johno