1.5.0 • Published 9 days ago
pollination-widgets v1.5.0
Pollination Widgets
A series of components for Pollination CAD and web.
Notes
PythonWrapper
component creates a python instance to execute scripts.
You can create custom components based on PythonWrapper
install python and install modules using packages
props (e.g. ShapeScript
)
{
official: [],
micropip: [ 'ladybug-core' ]
}
Current script limits
- The script has just one source file
- The script can have variables and the syntax for a variable is
{{ my_variable }}
- A variable can be a
primitive
,list
,dict
but python object is not supported - It does not support
return
value on runtime. You must usestdout
as workaround for now
Building
yarn build
Storybook
To run a live-reload Storybook server on your local machine:
yarn storybook
To export your Storybook as static files:
yarn build-storybook
You can then serve the files under storybook-static
using S3, GitHub pages, Express etc. I've hosted this library at: https://www.harveydelaney.com/react-component-library
Components
Basic
- Button
- NumberInput
- PythonWrapper
Widgets
- CrossShape
- EShape
- LShape
- NorthSign
- Rectangle
- ShapeScript
- TShape
- UShape
Script
- ShapeScript