A series of components for Pollination CAD and web.
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' ]
}
- 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
yarn build
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
- Button
- NumberInput
- PythonWrapper
- CrossShape
- EShape
- LShape
- NorthSign
- Rectangle
- ShapeScript
- TShape
- UShape
- ShapeScript