Custom React button

Custom React button

Hi there!

Material UI is great, but sometimes designer has own view... like on image. Nothing is impossible. You can create your own custom button that running by css.

Here we have one question: how can we manage dynamically svg icon color for different button styles. In this case I use mask css property. It allows to change icon color according to button style and you don't need to think about original color of icon. You just pass icon to component props and get result.

Example of code you can find here: https://github.com/VinnikA/base-button

要查看或添加评论,请登录

社区洞察

其他会员也浏览了