Skip to content

The 'responsive' prop on the Button component has no effect #2976

Open

Description

@jcro21

The Button component has the following prop:

/**
* If true, button scales to 100% width on small form factors.
*/
responsive: PropTypes.bool,

https://github.com/salesforce/design-system-react/blob/master/components/button/index.jsx#L177

This prop does not appear to have any effect when set to true (or false naturally).

This issue is demonstrated on the storybook example:
http://design-system-react-components.herokuapp.com/iframe.html?id=sldsbutton--doc-site-base-neutral&args=&viewMode=story

Looks like at some point the code conditionally adding the class was accidentally left out.

It should probably add the class slds-max-small-size--1-of-1 or some conditional variant of slds-button_stretch. In the past it was slds-max-small-button--stretch - this was removed in this commit a796c5b on 22 Jul 2016:
a796c5b#diff-1beac10e4cb18d36a1e2e3de7103d0f359da4b9b5748c851ce1c8061f1a803aeL143

Activity

  1. ashutosh887 commented on Jan 15, 2022

    @ashutosh887

    I would like to work on this Issue
    Please assign to me and guide me once

  2. stale commented on Apr 18, 2022

    @stale

    This issue has been automatically marked as stale, because it has not had recent activity. It will be closed if no further activity occurs. Maintainers are responsible for tech debt and project health. This is most likely a new components or component feature request. Please submit a pull request for or request feedback on this feature. Thank you.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions