thumbprint icon indicating copy to clipboard operation
thumbprint copied to clipboard

[@thumbtack/tp-ui-react-button-row]: ButtonRow doesn't allow for full width buttons.

Open xanderwebs opened this issue 6 years ago • 2 comments

This is perhaps intentional, but filing here just in case it's not. When there are two full width buttons, I expected the component to render two 50% full buttons. Instead I got two small buttons.

<ButtonRow>
    <Button width="full" onClick={this.onClickSubmit}>
        Continue
    </Button>
    <Button width="full" onClick={onCloseClick} theme="secondary">
        Cancel
    </Button>
</ButtonRow>

Expected: screen shot 2019-01-08 at 4 16 01 pm

Actual: screen shot 2019-01-08 at 4 13 41 pm

cc @danoc

xanderwebs avatar Jan 09 '19 00:01 xanderwebs

Hi @xanderwebs! If I remember correctly, this was intentional because Joe J., at the time, didn't want to support side-by-side full width buttons.

We typically use right-aligned buttons within modals with the primary CTA as the right-most button. If the designer feels strongly, I'd recommend accomplishing this layout with flexbox.

One thing to consider is is how the buttons will look on mobile web. The ButtonRow component, if used, can handle that stacking:

https://thumbprint.design/api/components/layout/button-row/react/#example-stacked-at-small

danoc avatar Jan 09 '19 01:01 danoc

Hi @xanderwebs! @jonpkerwin and I have been working on buttons lately and it looks like we'll be making this 50/50 button layout an official pattern. I'll keep this open until it is implemented. Hope the workaround worked out out for you as a quick solution.

danoc avatar Jan 26 '19 04:01 danoc