react-desktop icon indicating copy to clipboard operation
react-desktop copied to clipboard

chore: refactor button to use styled-components

Open pixelass opened this issue 6 years ago • 3 comments

This is just a suggestion @gabrielbull.

It does not implement the basic integration of the library features.

Right now I just removed all other dependencies/features. I kept the version for the styles to allow supporting different os x versions.

Screen Shot 2019-09-11 at 14 35 48

pixelass avatar Sep 11 '19 12:09 pixelass

I think we should limit the changes to styled-components only and not change the logic or introduce hooks.

I would be in favour of those changes too but not in this PR.

davej avatar Sep 11 '19 14:09 davej

I fully understand. The Button component would only wrap the StyledButton and radium would be removed.

The main reason for the bigger change was that I'm not sure how the old customization would play with the new styling. I think most things could be handled over a ThemeProvider and could therefore be simplified.

The only things that would stay are the eventHandling (onEnter, onClick...) which I would have implemented in hooks for simplicity. I can make the example more complete here and open a new draft where I try to keep the underlying logic (while I think it might be messy in favor of keeping changes to a minimum).

IMHO the change would require a major bump anyways.

That said, I haven't really looked into this lib yet so these are just assumptions.

Thx for the feedback so far.

pixelass avatar Sep 11 '19 14:09 pixelass

The main reason for the bigger change was that I'm not sure how the old customization would play with the new styling. I think most things could be handled over a ThemeProvider and could therefore be simplified.

Perhaps the best thing to do is get a complete component working with theming? It may be a bit easier to evaluate the pros and cons then.

davej avatar Sep 11 '19 14:09 davej