Commit 4349f633 authored by Lyza Danger Gardner's avatar Lyza Danger Gardner Committed by Lyza Gardner

Use `Icon` in `FilterSelect`

parent 9afd3943
import { SvgIcon } from '@hypothesis/frontend-shared'; import { Icon } from '@hypothesis/frontend-shared';
import Menu from './Menu'; import Menu from './Menu';
import MenuItem from './MenuItem'; import MenuItem from './MenuItem';
...@@ -36,7 +36,9 @@ function FilterSelect({ ...@@ -36,7 +36,9 @@ function FilterSelect({
const menuLabel = ( const menuLabel = (
<span className="FilterSelect__menu-label"> <span className="FilterSelect__menu-label">
{icon && <SvgIcon name={icon} className="FilterSelect__menu-icon" />} {icon && (
<Icon name={icon} classes="u-icon--medium hyp-u-margin--right--3" />
)}
{selected.display} {selected.display}
</span> </span>
); );
......
...@@ -65,7 +65,7 @@ describe('FilterSelect', () => { ...@@ -65,7 +65,7 @@ describe('FilterSelect', () => {
const wrapper = createComponent({ icon: 'profile' }); const wrapper = createComponent({ icon: 'profile' });
const label = mount(wrapper.find('Menu').props().label); const label = mount(wrapper.find('Menu').props().label);
const icon = label.find('SvgIcon'); const icon = label.find('Icon');
assert.isTrue(icon.exists()); assert.isTrue(icon.exists());
assert.equal(icon.props().name, 'profile'); assert.equal(icon.props().name, 'profile');
......
...@@ -24,9 +24,4 @@ ...@@ -24,9 +24,4 @@
flex-shrink: 0; flex-shrink: 0;
font-weight: bold; font-weight: bold;
} }
&__menu-icon {
@include utils.icon--medium;
margin-right: var.$layout-space--xsmall;
}
} }
...@@ -49,6 +49,10 @@ ...@@ -49,6 +49,10 @@
@include utils.icon--small; @include utils.icon--small;
} }
.u-icon--medium {
@include utils.icon--medium;
}
.u-icon--large { .u-icon--large {
@include utils.icon--large; @include utils.icon--large;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment