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

fix(styles): update Switch to latest design [ci visual] #4967

Merged
merged 1 commit into from
Nov 8, 2023

Conversation

InnaAtanasova
Copy link
Contributor

Related Issue

Closes #4402

Description

  • update the component to match the latest Horizon design
  • added Text Switch
  • fixed RTL issues

BREAKING CHANGE:

  1. Basic/Default Switch now has icons:

Before:

<label class="fd-switch">
    <span class="fd-switch__control">
        <input class="fd-switch__input" type="checkbox" name="" value="" aria-labelledby="label1" id="y21YO3251">
        <div class="fd-switch__slider">
             <div class="fd-switch__track">
                  <span class="fd-switch__handle" role="presentation"></span>
              </div>
        </div>
    </span>
</label>

After:

<label class="fd-switch">
    <span class="fd-switch__control">
         <input class="fd-switch__input" type="checkbox" name="" value="" aria-labelledby="label1" id="y21YO3251">
         <div class="fd-switch__slider">
              <div class="fd-switch__track">
                   <i role="presentation" class="fd-switch__icon fd-switch__icon--on sap-icon--accept"></i>
                   <span class="fd-switch__handle" role="presentation"></span>
                   <i role="presentation" class="fd-switch__icon fd-switch__icon--off sap-icon--less"></i>
              </div>
          </div>
    </span>
</label>
  1. Text Switch has the text inside
    Before:
<label class="fd-switch">
    <span class="fd-switch__text">Off</span>
    <span class="fd-switch__control">
        <input class="fd-switch__input" type="checkbox" name="" aria-labelledby="label3" value="" id="y21Y677251">
        <div class="fd-switch__slider">
            <div class="fd-switch__track">
                <span class="fd-switch__handle" role="presentation"></span>
            </div>
           </div>
       </span>
</label>

After:

<label class="fd-switch fd-switch--text">
    <span class="fd-switch__control">
        <input class="fd-switch__input" type="checkbox" name="" aria-labelledby="label3" value="" id="y21Y677251">
        <div class="fd-switch__slider">
            <div class="fd-switch__track">
                <span class="fd-switch__text fd-switch__text--on">on</span>
                <span class="fd-switch__handle" role="presentation"></span>
                <span class="fd-switch__text fd-switch__text--off">off</span>
            </div>
        </div>
    </span>
</label>

@InnaAtanasova InnaAtanasova added the Horizon 2023 Horizon Design Changes in 2023 label Nov 6, 2023
@InnaAtanasova InnaAtanasova added this to the Sprint 125 milestone Nov 6, 2023
@InnaAtanasova InnaAtanasova requested a review from a team November 6, 2023 19:05
@InnaAtanasova InnaAtanasova self-assigned this Nov 6, 2023
Copy link

netlify bot commented Nov 6, 2023

Deploy Preview for fundamental-styles ready!

Name Link
🔨 Latest commit e0bff3b
🔍 Latest deploy log https://app.netlify.com/sites/fundamental-styles/deploys/654ba909cbd0bb000851fad8
😎 Deploy Preview https://deploy-preview-4967--fundamental-styles.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@droshev droshev self-requested a review November 7, 2023 20:23
@InnaAtanasova InnaAtanasova force-pushed the fix/update-switch branch 2 times, most recently from 87b50dc to 57e4f85 Compare November 8, 2023 14:33
@InnaAtanasova InnaAtanasova merged commit 6fcc250 into main Nov 8, 2023
8 checks passed
@InnaAtanasova InnaAtanasova deleted the fix/update-switch branch November 8, 2023 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Horizon 2023 Horizon Design Changes in 2023
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Component Design Update: Switch
3 participants