ZEISS/precise-ui

Provide option to disable full-width mobile button

michaelx opened this issue · 3 comments

New Feature Proposal

Description

Currently Button is full-width up to 979px, however it is not always practical to use a full-width button on smaller screens by default. It would be great to offer an option to disable it, if desired.

Let me know what you think.

Workaround

const StyledButton = styled(Button)`
  width: auto;
`;

That's a good idea, what would you propose for the prop name? disableResponsiveness, disableMobileMode, mode='desktop'?

It’s a bit long, but I tend towards disableMobileFullWidth, because it makes sense to keep other responsive styles like padding and font size etc.

@michaelx FYI, this has been merged on develop on the last PR.