From 3f4fd4ef41e96dfa77ab22c2321b04727f8ab0ca Mon Sep 17 00:00:00 2001 From: Aaron Robertshaw <60436221+aaronrobertshaw@users.noreply.github.com> Date: Thu, 20 May 2021 14:57:54 +1000 Subject: [PATCH] Move border style icons to icons package --- .../components/border-style-control/icons.js | 30 ------------------- .../components/border-style-control/index.js | 12 +++----- packages/icons/src/index.js | 3 ++ packages/icons/src/library/line-dashed.js | 16 ++++++++++ packages/icons/src/library/line-dotted.js | 16 ++++++++++ packages/icons/src/library/line-solid.js | 12 ++++++++ 6 files changed, 51 insertions(+), 38 deletions(-) delete mode 100644 packages/block-editor/src/components/border-style-control/icons.js create mode 100644 packages/icons/src/library/line-dashed.js create mode 100644 packages/icons/src/library/line-dotted.js create mode 100644 packages/icons/src/library/line-solid.js diff --git a/packages/block-editor/src/components/border-style-control/icons.js b/packages/block-editor/src/components/border-style-control/icons.js deleted file mode 100644 index 8af50413999a0..0000000000000 --- a/packages/block-editor/src/components/border-style-control/icons.js +++ /dev/null @@ -1,30 +0,0 @@ -/** - * WordPress dependencies - */ -import { Path, SVG } from '@wordpress/components'; - -export const solidIcon = ( - - - -); - -export const dashedIcon = ( - - - -); - -export const dottedIcon = ( - - - -); diff --git a/packages/block-editor/src/components/border-style-control/index.js b/packages/block-editor/src/components/border-style-control/index.js index ee3a936bc3291..6c44b7bc2fe8f 100644 --- a/packages/block-editor/src/components/border-style-control/index.js +++ b/packages/block-editor/src/components/border-style-control/index.js @@ -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' }, ]; /** diff --git a/packages/icons/src/index.js b/packages/icons/src/index.js index d98147331d084..e325bddc3fa0c 100644 --- a/packages/icons/src/index.js +++ b/packages/icons/src/index.js @@ -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'; diff --git a/packages/icons/src/library/line-dashed.js b/packages/icons/src/library/line-dashed.js new file mode 100644 index 0000000000000..2d8ca1f79aef2 --- /dev/null +++ b/packages/icons/src/library/line-dashed.js @@ -0,0 +1,16 @@ +/** + * WordPress dependencies + */ +import { Path, SVG } from '@wordpress/primitives'; + +const lineDashed = ( + + + +); + +export default lineDashed; diff --git a/packages/icons/src/library/line-dotted.js b/packages/icons/src/library/line-dotted.js new file mode 100644 index 0000000000000..01d7e9ab671cc --- /dev/null +++ b/packages/icons/src/library/line-dotted.js @@ -0,0 +1,16 @@ +/** + * WordPress dependencies + */ +import { Path, SVG } from '@wordpress/primitives'; + +const lineDotted = ( + + + +); + +export default lineDotted; diff --git a/packages/icons/src/library/line-solid.js b/packages/icons/src/library/line-solid.js new file mode 100644 index 0000000000000..c8dc39c453669 --- /dev/null +++ b/packages/icons/src/library/line-solid.js @@ -0,0 +1,12 @@ +/** + * WordPress dependencies + */ +import { Path, SVG } from '@wordpress/primitives'; + +const lineSolid = ( + + + +); + +export default lineSolid;