Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

readme.md

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