Skip to content

Commit

Permalink
Move border style icons to icons package
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronrobertshaw committed Jun 24, 2021
1 parent 8bf781d commit c00fe03
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 38 deletions.
30 changes: 0 additions & 30 deletions packages/block-editor/src/components/border-style-control/icons.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@
*/
import { Button } from '@wordpress/components';
import { __ } from '@wordpress/i18n';

/**
* Internal dependencies
*/
import { dashedIcon, dottedIcon, solidIcon } from './icons';
import { lineDashed, lineDotted, lineSolid } from '@wordpress/icons';

const BORDER_STYLES = [
{ label: __( 'Solid' ), icon: solidIcon, value: 'solid' },
{ label: __( 'Dashed' ), icon: dashedIcon, value: 'dashed' },
{ label: __( 'Dotted' ), icon: dottedIcon, value: 'dotted' },
{ label: __( 'Solid' ), icon: lineSolid, value: 'solid' },
{ label: __( 'Dashed' ), icon: lineDashed, value: 'dashed' },
{ label: __( 'Dotted' ), icon: lineDotted, value: 'dotted' },
];

/**
Expand Down
3 changes: 3 additions & 0 deletions packages/icons/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ export { default as keyboardClose } from './library/keyboard-close';
export { default as keyboardReturn } from './library/keyboard-return';
export { default as layout } from './library/layout';
export { default as lifesaver } from './library/lifesaver';
export { default as lineDashed } from './library/line-dashed';
export { default as lineDotted } from './library/line-dotted';
export { default as lineSolid } from './library/line-solid';
export { default as link } from './library/link';
export { default as linkOff } from './library/link-off';
export { default as list } from './library/list';
Expand Down
16 changes: 16 additions & 0 deletions packages/icons/src/library/line-dashed.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* WordPress dependencies
*/
import { Path, SVG } from '@wordpress/primitives';

const lineDashed = (
<SVG xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none">
<Path
fillRule="evenodd"
d="M5 11.25h3v1.5H5v-1.5zm5.5 0h3v1.5h-3v-1.5zm8.5 0h-3v1.5h3v-1.5z"
clipRule="evenodd"
/>
</SVG>
);

export default lineDashed;
16 changes: 16 additions & 0 deletions packages/icons/src/library/line-dotted.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* WordPress dependencies
*/
import { Path, SVG } from '@wordpress/primitives';

const lineDotted = (
<SVG xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none">
<Path
fillRule="evenodd"
d="M5.25 11.25h1.5v1.5h-1.5v-1.5zm3 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5zm1.5 0h1.5v1.5h-1.5v-1.5zm4.5 0h-1.5v1.5h1.5v-1.5z"
clipRule="evenodd"
/>
</SVG>
);

export default lineDotted;
12 changes: 12 additions & 0 deletions packages/icons/src/library/line-solid.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* WordPress dependencies
*/
import { Path, SVG } from '@wordpress/primitives';

const lineSolid = (
<SVG xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none">
<Path d="M5 11.25h14v1.5H5z" />
</SVG>
);

export default lineSolid;

0 comments on commit c00fe03

Please sign in to comment.