siddharthkp/react-ui

Full width prop to the button

ankibalyan opened this issue · 4 comments

It would be good if Button component supports fullwidth prop, it often required in mobile views.

Button will occupied full width of the container
<Button fullwidth></Button>

Button will be full width in mobile view, but It'll behave normal in other modes
<Button fullwidth={[true, false]}></Button>

I'd be happy to send a PR if this is useful to have on Button components.

I can imagine this prop being useful for multiple building blocks

would you like to pair on this?

yes surely.

I think it can added on element component itself, and checked on the fullWidth keyword to set the width. I'll send a PR soon.