Skip to content

Handling display in Links and Buttons #312

Description

@broccolini

Hi @shawnbot and @emplums, re our discussion in slack on display and links and buttons, I thought I'd put it in an issue...

Use cases we need to account for:

  • making a button, or a button that looks like a link, fill the full width of a container
  • switching the width of a button/link from mobile to desktop

Proposed api changes:

  • give button width system props
  • make sure <Button is="a" /> works properly
  • make sure <Button> has display: inline-block; by default so that the width props work (it does in primer css)

This would mean we can do something like:

<Button width={[1, 1, 1/2, 'auto']} />

Let me know what you think and whether I missed any scenarios we need to account for!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions