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

feat(form-field): Add support for space-between #5759

Merged
merged 1 commit into from
Apr 1, 2020

Conversation

copybara-service[bot]
Copy link
Contributor

feat(form-field): Add support for space-between

This PR adds mdc-form-field--space-between class.
fixes: #5747
This allows easily creating this layout:
image

https://jsfiddle.net/Misiu/quzgcsev/25/
Sample code:

<div class="mdc-form-field mdc-form-field--space-between" id="form1">
  <div class="mdc-switch" id="switch1">
    <div class="mdc-switch__track"></div>
    <div class="mdc-switch__thumb-underlay">
      <div class="mdc-switch__thumb"></div>
      <input type="checkbox" id="basic-switch1" class="mdc-switch__native-control" role="switch" aria-checked="false">
    </div>
  </div>
  <label for="basic-switch1">off/on</label>
</div>

I've added support for mdc-form-field--align-end, but I'm not sure how support for RTL languages should look.

Also, this is my first PR in this repo, so sorry for any mistakes.

This PR adds `mdc-form-field--space-between` class.
fixes: #5747
This allows easily creating this layout:
![image](https://user-images.githubusercontent.com/1741838/77768710-23904a80-7043-11ea-9c44-8febdc8e0430.png)

https://jsfiddle.net/Misiu/quzgcsev/25/
Sample code:

```
<div class="mdc-form-field mdc-form-field--space-between" id="form1">
  <div class="mdc-switch" id="switch1">
    <div class="mdc-switch__track"></div>
    <div class="mdc-switch__thumb-underlay">
      <div class="mdc-switch__thumb"></div>
      <input type="checkbox" id="basic-switch1" class="mdc-switch__native-control" role="switch" aria-checked="false">
    </div>
  </div>
  <label for="basic-switch1">off/on</label>
</div>
```

I've added support for `mdc-form-field--align-end`, but I'm not sure how support for RTL languages should look.

Also, this is my first PR in this repo, so sorry for any mistakes.

PiperOrigin-RevId: 304204642
@asyncLiz
Copy link
Contributor

asyncLiz commented Apr 1, 2020

See #5754 for the full history of this PR. Copybara created a duplicate PR and merged the wrong one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support space-between in form field
2 participants