Skip to content

Commit

Permalink
feat(progress-indicator): update to use carbon icons (#5122)
Browse files Browse the repository at this point in the history
* feat(progress-indicator): update to use carbon icons

* fix(progress-indicator): remove top margin from icon

Co-authored-by: TJ Egan <tw15egan@gmail.com>
Co-authored-by: Abbey Hart <abbeyhrt@gmail.com>
  • Loading branch information
3 people committed Jan 28, 2020
1 parent e72508e commit aa33fa0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
7 changes: 5 additions & 2 deletions packages/components/docs/sass.md
Original file line number Diff line number Diff line change
Expand Up @@ -20476,10 +20476,13 @@ Progress indicator styles
}

.#{$prefix}--progress-step--current svg {
width: 14px;
height: 14px;
stroke: $interactive-01;
fill: $interactive-01;
margin-top: rem(9.5px);

path:last-of-type {
stroke-width: 40%;
}
}

//INCOMPLETE STYLING
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,12 @@
}

.#{$prefix}--progress-step--current svg {
width: 14px;
height: 14px;
stroke: $interactive-01;
fill: $interactive-01;
margin-top: rem(9.5px);

path:last-of-type {
stroke-width: 40%;
}
}

//INCOMPLETE STYLING
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ import PropTypes from 'prop-types';
import React, { Component } from 'react';
import classnames from 'classnames';
import { settings } from 'carbon-components';
import { CheckmarkOutline16, Warning16 } from '@carbon/icons-react';
import {
CheckmarkOutline16,
Warning16,
RadioButtonChecked16,
RadioButton16,
} from '@carbon/icons-react';
import { keys, matches } from '../../internal/keyboard';

const { prefix } = settings;
Expand Down Expand Up @@ -61,10 +66,9 @@ export function ProgressStep({
}
if (current) {
return (
<svg>
<path d="M 7, 7 m -7, 0 a 7,7 0 1,0 14,0 a 7,7 0 1,0 -14,0" />
<RadioButtonChecked16>
<title>{description}</title>
</svg>
</RadioButtonChecked16>
);
}
if (complete) {
Expand All @@ -75,10 +79,9 @@ export function ProgressStep({
);
}
return (
<svg>
<RadioButton16>
<title>{description}</title>
<path d="M8 1C4.1 1 1 4.1 1 8s3.1 7 7 7 7-3.1 7-7-3.1-7-7-7zm0 13c-3.3 0-6-2.7-6-6s2.7-6 6-6 6 2.7 6 6-2.7 6-6 6z" />
</svg>
</RadioButton16>
);
};

Expand Down

0 comments on commit aa33fa0

Please sign in to comment.