Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Remove dashicon classes #2848

Merged
merged 1 commit into from Jul 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion assets/js/base/components/chip/removable-chip.js
Expand Up @@ -72,7 +72,11 @@ const RemovableChip = ( {
className="wc-block-components-chip__remove"
{ ...removeProps }
>
<Icon srcElement={ noAlt } size={ 16 } />
<Icon
className="wc-block-components-chip__remove-icon"
srcElement={ noAlt }
size={ 16 }
/>
</RemoveElement>
</Chip>
);
Expand Down
6 changes: 3 additions & 3 deletions assets/js/base/components/chip/style.scss
Expand Up @@ -44,10 +44,10 @@
border: 0;
appearance: none;
padding: 0;
}

> .dashicon {
vertical-align: middle;
}
.wc-block-components-chip__remove-icon {
vertical-align: middle;
}
}

Expand Down
12 changes: 6 additions & 6 deletions assets/js/base/components/chip/test/__snapshots__/index.js.snap
Expand Up @@ -107,7 +107,7 @@ exports[`RemovableChip should render custom aria label 1`] = `
>
<svg
aria-hidden="true"
className="dashicon dashicons-arrow-down-alt2"
className="wc-block-components-chip__remove-icon"
focusable="false"
height={16}
role="img"
Expand Down Expand Up @@ -149,7 +149,7 @@ exports[`RemovableChip should render default aria label if text is a node 1`] =
>
<svg
aria-hidden="true"
className="dashicon dashicons-arrow-down-alt2"
className="wc-block-components-chip__remove-icon"
focusable="false"
height={16}
role="img"
Expand Down Expand Up @@ -189,7 +189,7 @@ exports[`RemovableChip should render screen reader text aria label 1`] = `
>
<svg
aria-hidden="true"
className="dashicon dashicons-arrow-down-alt2"
className="wc-block-components-chip__remove-icon"
focusable="false"
height={16}
role="img"
Expand Down Expand Up @@ -224,7 +224,7 @@ exports[`RemovableChip should render text and the remove button 1`] = `
>
<svg
aria-hidden="true"
className="dashicon dashicons-arrow-down-alt2"
className="wc-block-components-chip__remove-icon"
focusable="false"
height={16}
role="img"
Expand Down Expand Up @@ -259,7 +259,7 @@ exports[`RemovableChip should render with disabled remove button 1`] = `
>
<svg
aria-hidden="true"
className="dashicon dashicons-arrow-down-alt2"
className="wc-block-components-chip__remove-icon"
focusable="false"
height={16}
role="img"
Expand Down Expand Up @@ -295,7 +295,7 @@ exports[`RemovableChip with removeOnAnyClick should be a button when removeOnAny
>
<svg
aria-hidden="true"
className="dashicon dashicons-arrow-down-alt2"
className="wc-block-components-chip__remove-icon"
focusable="false"
height={16}
role="img"
Expand Down
2 changes: 1 addition & 1 deletion assets/js/base/components/dropdown-selector/style.scss
Expand Up @@ -123,7 +123,7 @@ $dropdown-selector-line-height: 18/14;
line-height: 1;
padding: 0 0 0 0.3em;

> .dashicon {
> svg {
display: block;
}
}
Expand Down
8 changes: 1 addition & 7 deletions assets/js/icons/library/arrow-down-alt2.js
Expand Up @@ -2,19 +2,13 @@
* External dependencies
*/
import { SVG } from 'wordpress-components';
import classnames from 'classnames';

const Component = ( { className, size = 20, ...extraProps } ) => {
const iconClass = classnames(
'dashicon',
'dashicons-arrow-down-alt2',
className
);
return (
<SVG
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 20 20"
className={ iconClass }
className={ className }
width={ size }
height={ size }
{ ...extraProps }
Expand Down
8 changes: 1 addition & 7 deletions assets/js/icons/library/no-alt.js
Expand Up @@ -2,19 +2,13 @@
* External dependencies
*/
import { SVG } from 'wordpress-components';
import classnames from 'classnames';

const Component = ( { className, size, ...extraProps } ) => {
const iconClass = classnames(
'dashicon',
'dashicons-arrow-down-alt2',
className
);
return (
<SVG
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 20 20"
className={ iconClass }
className={ className }
width={ size }
height={ size }
{ ...extraProps }
Expand Down