Skip to content

Commit

Permalink
fix(Toggle): support labels for small toggles
Browse files Browse the repository at this point in the history
  • Loading branch information
emyarod committed Feb 5, 2021
1 parent 79db553 commit 636af2c
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions packages/react/src/components/Toggle/Toggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,20 +152,12 @@ class Toggle extends React.Component {
<path d="M2.2 2.7L5 0 6 1 2.2 5 0 2.7 1 1.5z" />
</svg>
)}
{!size && (
<>
<span
className={`${prefix}--toggle__text--off`}
aria-hidden="true">
{labelA}
</span>
<span
className={`${prefix}--toggle__text--on`}
aria-hidden="true">
{labelB}
</span>
</>
)}
<span className={`${prefix}--toggle__text--off`} aria-hidden="true">
{labelA}
</span>
<span className={`${prefix}--toggle__text--on`} aria-hidden="true">
{labelB}
</span>
</span>
</label>
</div>
Expand Down

0 comments on commit 636af2c

Please sign in to comment.