pie6k / react-ios-corners

iOS like border-radius corners react component
https://pie6k.github.io/react-ios-corners/
MIT License
249 stars 7 forks source link

How to integrate with css modules? #1

Open vbylen opened 3 years ago

vbylen commented 3 years ago

Wrapping an element with <Squircle /> in the component.js file does not play nice with css imported from the component.module.css file.

Any suggestions besides switching to styled components?

Great work.

pie6k commented 3 years ago

Can you show some example use-case code-snippet?

vbylen commented 3 years ago

https://codesandbox.io/s/wandering-brook-f78j6?file=/src/App.js

pie6k commented 3 years ago

Thats interesting case, so you can add

  width: 100%;
  border: none;

to your button styles.

By default Squircle has 100% width while button by default is inlined which means it does not stretch horizontally.

Adding those it seems to look ok:

CleanShot 2021-04-12 at 19 17 41@2x
vbylen commented 3 years ago

Could we implement an option to change the default width?