react-ios-corners icon indicating copy to clipboard operation
react-ios-corners copied to clipboard

How to integrate with css modules?

Open cloudorbush opened this issue 4 years ago • 4 comments

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.

cloudorbush avatar Apr 11 '21 23:04 cloudorbush

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

pie6k avatar Apr 12 '21 09:04 pie6k

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

cloudorbush avatar Apr 12 '21 16:04 cloudorbush

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

pie6k avatar Apr 12 '21 17:04 pie6k

Could we implement an option to change the default width?

cloudorbush avatar Apr 12 '21 23:04 cloudorbush