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

Outline TextField end adornment margin is too high #14800

Closed
2 tasks done
pladaria opened this issue Mar 8, 2019 · 6 comments
Closed
2 tasks done

Outline TextField end adornment margin is too high #14800

pladaria opened this issue Mar 8, 2019 · 6 comments
Labels
component: text field This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation

Comments

@pladaria
Copy link

pladaria commented Mar 8, 2019

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

Current Behavior 😯

End adornment right margin is too high when used in outline TextField

preview

Expected

https://material-components.github.io/material-components-web-catalog/#/component/text-field?icons=trailingIcon&type=outlined

Steps to Reproduce 🕹

Demo: https://codesandbox.io/s/009vrmpqvn

@oliviertassinari
Copy link
Member

oliviertassinari commented Mar 8, 2019

@pladaria Google sign-in page agrees with you:

Capture d’écran 2019-03-08 à 23 01 34

We are introducing a new edge property to solve the problem in #14758.

        <TextField
          id="outlined-adornment-password"
          className={clsx(classes.margin, classes.textField)}
          variant="outlined"
          type={this.state.showPassword ? 'text' : 'password'}
          label="Password"
          value={this.state.password}
          onChange={this.handleChange('password')}
          InputProps={{
            endAdornment: (
              <InputAdornment position="end">
                <IconButton
                  aria-label="Toggle password visibility"
                  onClick={this.handleClickShowPassword}
+                 edge="end"
                >
                  {this.state.showPassword ? <VisibilityOff /> : <Visibility />}
                </IconButton>
              </InputAdornment>
            ),
          }}
        />

Capture d’écran 2019-03-08 à 23 07 08

We should update the documentation once #14758 is merged. Do you want to work on it? :)

@oliviertassinari oliviertassinari added good first issue Great for first contributions. Enable to learn the contribution process. component: text field This is the name of the generic UI component, not the React module! labels Mar 8, 2019
@d7my11
Copy link

d7my11 commented Jun 19, 2019

i can open a PR for this

@d7my11
Copy link

d7my11 commented Jun 19, 2019

actually edge="end" is already added to the icon but it doesn't solve the problem

@oliviertassinari
Copy link
Member

@d7my11 Right, it seems that the problem was already fixed: https://material-ui.com/components/text-fields/#outlined-input-adornments. It looks alright.

What do you mean by "doesn't solve the problem"?

@oliviertassinari oliviertassinari added docs Improvements or additions to the documentation and removed good first issue Great for first contributions. Enable to learn the contribution process. labels Jun 20, 2019
@oliviertassinari
Copy link
Member

I'm closing, waiting for more information to be provided.

@d7my11
Copy link

d7my11 commented Jun 24, 2019

@oliviertassinari i thought padding should be less than 12px but i was wrong. sorry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: text field This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation
Projects
None yet
Development

No branches or pull requests

3 participants