Visitar URL original
GitHub - anderswestberg/test-plasmic · GitHub
Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Test Plasmic

Install

Install Plasmic component sync tool:

npm install -g @plasmicapp/cli

Initialize and get the Plasmic project:

plasmic sync --projects pKfeNtvsdnYFPhvQDjNPYX

Update changes from the Plasmic project

plasmic sync

Edit React component

Edit the file src/components/Doggy.tsx

The props are empty when first installed from Plasmic:

interface DoggyProps extends DefaultDoggyProps {}

Add props to DoggyProps

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!`)}} />

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages