Skip to content
This repository has been archived by the owner on Oct 19, 2021. It is now read-only.

Commit

Permalink
fix(toggle): add checkmark icon for v10 mini toggle (#1936)
Browse files Browse the repository at this point in the history
  • Loading branch information
alisonjoseph authored and emyarod committed Mar 7, 2019
1 parent ced4802 commit c1d0db5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
Binary file added .yarn-offline-mirror/carbon-components-9.81.5.tgz
Binary file not shown.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ We recommend the use of [React Storybook](https://github.com/storybooks/react-st
$ export CARBON_REACT_STORYBOOK_USE_STYLE_SOURCEMAP=true
```
- `true` to `CARBON_USE_EXPERIMENTAL_FEATURES` environment variable to test some of the experimental changes:
```
$ export CARBON_USE_EXPERIMENTAL_FEATURES=true
```
Caveats:
- `CARBON_REACT_STORYBOOK_USE_EXTERNAL_CSS=true` and `CARBON_REACT_STORYBOOK_USE_STYLE_SOURCEMAP=true` make WebPack builds slightly slower.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
}
},
"peerDependencies": {
"carbon-components": "^9.48.2",
"carbon-components": "^9.81.5",
"carbon-icons": "^7.0.5",
"react": "^16.4.0",
"react-dom": "^16.4.0"
Expand Down
17 changes: 7 additions & 10 deletions src/components/ToggleSmall/ToggleSmall.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import PropTypes from 'prop-types';
import React from 'react';
import classNames from 'classnames';
import { settings } from 'carbon-components';
import { componentsX } from '../../internal/FeatureFlags';

const { prefix } = settings;

Expand Down Expand Up @@ -57,15 +56,13 @@ const ToggleSmall = ({

<label className={`${prefix}--toggle__label`} htmlFor={id}>
<span className={`${prefix}--toggle__appearance`}>
{componentsX ? null : (
<svg
className={`${prefix}--toggle__check`}
width="6px"
height="5px"
viewBox="0 0 6 5">
<path d="M2.2403 2.7299L4.9245 0 6 1.1117 2.2384 5 0 2.6863 1.0612 1.511z" />
</svg>
)}
<svg
className={`${prefix}--toggle__check`}
width="6px"
height="5px"
viewBox="0 0 6 5">
<path d="M2.2403 2.7299L4.9245 0 6 1.1117 2.2384 5 0 2.6863 1.0612 1.511z" />
</svg>
</span>
<span className={`${prefix}--assistive-text`}>{ariaLabel}</span>
</label>
Expand Down

0 comments on commit c1d0db5

Please sign in to comment.