helloswyg / autoshapes-example

🎨 Programmatically generated shapes to automatically spice up for your JS / React sites!
https://helloswyg.github.io/autoshapes-example/
MIT License
2 stars 0 forks source link

Refine Public Interface or Interfaces #2

Closed Danziger closed 2 years ago

Danziger commented 2 years ago

The main interface (for React) might look something like:

<Shape className="..." type="curyvy" orientation="vertical" padding={ 32 } />

But maybe some wrapper on top of that and/or different interfaces could be helpful, such as:

<Shape className="..." type="curyvy" orientation="vertical" padding={ 32 } repeat={ [8. 16] } />
<Shapes className="..." config={ [{ ... }, { ... }] } />

On the other hand, we need to decide what properties and values are we going to support and if a higher level abstraction could be helpful for some or some combinations of them.

Some additional considerations:

Danziger commented 2 years ago

@vincentropy I'll leave it to you to document the current (low-level I guess) interface in the README and link it here, for now I just added some things we could consider when tweaking them.

vincentropy commented 2 years ago

@Danziger I updated the public interface and expanded the readme to describe how it (currently) works.

See #4 for all changes.

I'm splitting some of the suggestions from above into separate issues. I would propose having separate issues for styling #8 and themes #5.