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

    Keywords

    none

    Install

    npm i property-controls

    DownloadsWeekly Downloads

    22

    Version

    0.0.59

    License

    MIT

    Unpacked Size

    14.4 kB

    Total Files

    8

    Last publish

    Collaborators

    • johno