phamfoo / react-native-figma-squircle

Figma-flavored squircles for React Native
MIT License
318 stars 15 forks source link

How about mapping style attributes instead of squircle params? #5

Closed finnp closed 3 years ago

finnp commented 3 years ago

Not sure if it's worth the API break, but I'm wondering if it wouldn't by nicer to map style attributes likeborderColor and backgroundColor instead of having a separate squircleParams attribute.

It would make it easier to use it as a drop in replacement when moving from Views to smooth corners.

In my project I'm using a wrapper like this (ignore the project specific defaults) image

Just wondering what you think :)

phamfoo commented 3 years ago

Hi, thanks for the suggestion. While it would be more convenient for the users, I don't want people to think they're using the same style props. The squircle params are used only to draw the SVG background. They're not native properties, so you can't do direct manipulation or animate them by creating an animated component.

finnp commented 3 years ago

Makes sense 👍