This commit is contained in:
Albert Juhé Lluveras 2020-07-10 20:20:57 +02:00 committed by GitHub
parent 8c06276b00
commit 0f43c3af0f
6 changed files with 17 additions and 25 deletions

View File

@ -72,7 +72,11 @@ const RemovableChip = ( {
className="wc-block-components-chip__remove" className="wc-block-components-chip__remove"
{ ...removeProps } { ...removeProps }
> >
<Icon srcElement={ noAlt } size={ 16 } /> <Icon
className="wc-block-components-chip__remove-icon"
srcElement={ noAlt }
size={ 16 }
/>
</RemoveElement> </RemoveElement>
</Chip> </Chip>
); );

View File

@ -44,10 +44,10 @@
border: 0; border: 0;
appearance: none; appearance: none;
padding: 0; padding: 0;
}
> .dashicon { .wc-block-components-chip__remove-icon {
vertical-align: middle; vertical-align: middle;
}
} }
} }

View File

@ -107,7 +107,7 @@ exports[`RemovableChip should render custom aria label 1`] = `
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
className="dashicon dashicons-arrow-down-alt2" className="wc-block-components-chip__remove-icon"
focusable="false" focusable="false"
height={16} height={16}
role="img" role="img"
@ -149,7 +149,7 @@ exports[`RemovableChip should render default aria label if text is a node 1`] =
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
className="dashicon dashicons-arrow-down-alt2" className="wc-block-components-chip__remove-icon"
focusable="false" focusable="false"
height={16} height={16}
role="img" role="img"
@ -189,7 +189,7 @@ exports[`RemovableChip should render screen reader text aria label 1`] = `
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
className="dashicon dashicons-arrow-down-alt2" className="wc-block-components-chip__remove-icon"
focusable="false" focusable="false"
height={16} height={16}
role="img" role="img"
@ -224,7 +224,7 @@ exports[`RemovableChip should render text and the remove button 1`] = `
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
className="dashicon dashicons-arrow-down-alt2" className="wc-block-components-chip__remove-icon"
focusable="false" focusable="false"
height={16} height={16}
role="img" role="img"
@ -259,7 +259,7 @@ exports[`RemovableChip should render with disabled remove button 1`] = `
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
className="dashicon dashicons-arrow-down-alt2" className="wc-block-components-chip__remove-icon"
focusable="false" focusable="false"
height={16} height={16}
role="img" role="img"
@ -295,7 +295,7 @@ exports[`RemovableChip with removeOnAnyClick should be a button when removeOnAny
> >
<svg <svg
aria-hidden="true" aria-hidden="true"
className="dashicon dashicons-arrow-down-alt2" className="wc-block-components-chip__remove-icon"
focusable="false" focusable="false"
height={16} height={16}
role="img" role="img"

View File

@ -123,7 +123,7 @@ $dropdown-selector-line-height: 18/14;
line-height: 1; line-height: 1;
padding: 0 0 0 0.3em; padding: 0 0 0 0.3em;
> .dashicon { > svg {
display: block; display: block;
} }
} }

View File

@ -2,19 +2,13 @@
* External dependencies * External dependencies
*/ */
import { SVG } from 'wordpress-components'; import { SVG } from 'wordpress-components';
import classnames from 'classnames';
const Component = ( { className, size = 20, ...extraProps } ) => { const Component = ( { className, size = 20, ...extraProps } ) => {
const iconClass = classnames(
'dashicon',
'dashicons-arrow-down-alt2',
className
);
return ( return (
<SVG <SVG
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 20 20" viewBox="0 0 20 20"
className={ iconClass } className={ className }
width={ size } width={ size }
height={ size } height={ size }
{ ...extraProps } { ...extraProps }

View File

@ -2,19 +2,13 @@
* External dependencies * External dependencies
*/ */
import { SVG } from 'wordpress-components'; import { SVG } from 'wordpress-components';
import classnames from 'classnames';
const Component = ( { className, size, ...extraProps } ) => { const Component = ( { className, size, ...extraProps } ) => {
const iconClass = classnames(
'dashicon',
'dashicons-arrow-down-alt2',
className
);
return ( return (
<SVG <SVG
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 20 20" viewBox="0 0 20 20"
className={ iconClass } className={ className }
width={ size } width={ size }
height={ size } height={ size }
{ ...extraProps } { ...extraProps }