Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have A Switch Statement Without Any Extra Padding #9587

Closed
1 task done
adeelibr opened this issue Dec 21, 2017 · 1 comment
Closed
1 task done

Have A Switch Statement Without Any Extra Padding #9587

adeelibr opened this issue Dec 21, 2017 · 1 comment
Labels
support: question Community support but can be turned into an improvement

Comments

@adeelibr
Copy link
Contributor

  • I have searched the issues of this repository and believe that this is not a duplicate.

This is my Switch component

`<Switch
          checked={isSubscriptionStatusActive}
          onChange={onHandleChangeSubscriptionStatus}
          disabled={subscriptionStatus === 'deactive'}
          aria-label="subscribption-status"
          classes={{
            root: classes.root,
            bar:  classes.bar,
          }}
  >`
  root: {
    display: 'inline-flex',
    width: 0,
    position: 'relative',
    flexShrink: 0,
  },
  bar: {
    borderRadius: 7,
    display: 'block',
    position: 'absolute',
    width: 34,
    height: 14,
    top: '50%',
    marginTop: -7,
    left: '50%',
    marginLeft: 0,
  },
};```

## Steps to Reproduce (for bugs)
https://codesandbox.io/s/x2wom4pm9z
https://codesandbox.io/embed/x2wom4pm9z


## Context
I want to have a Switch component without extra height, width, padding, margin

## Environment
| Tech         | Version |
|--------------|---------|
| Material-UI  |        beta 24 |
| React        |      16.2   |
@mbrookes mbrookes added the support: question Community support but can be turned into an improvement label Dec 21, 2017
@mbrookes
Copy link
Member

Please post implementation questions to gitter or StackOverflow, so we can keep github issues for bugs and feature requests. Feel free to link from here if you think an answer to your question will help others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support: question Community support but can be turned into an improvement
Projects
None yet
Development

No branches or pull requests

2 participants