Install Plasmic component sync tool:
npm install -g @plasmicapp/cli
Initialize and get the Plasmic project:
plasmic sync --projects pKfeNtvsdnYFPhvQDjNPYX
plasmic sync
The props are empty when first installed from Plasmic:
interface DoggyProps extends DefaultDoggyProps {}Example:
interface DoggyProps extends DefaultDoggyProps {
textBox?: { value?: string, onChange?: React.FormEventHandler<HTMLInputElement> }
button?: { onClick?: React.MouseEventHandler<HTMLButtonElement>
}Use as React component
<Doggy textBox={{ value, onChange: e => setValue(e.currentTarget.value)
}} button={{ onClick: e => alert(`${value} says vov!`)}} />