Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding more border style options #68432

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
/**
* WordPress dependencies
*/
import { lineDashed, lineDotted, lineSolid } from '@wordpress/icons';
import {
lineDashed,
lineDotted,
lineSolid,
lineDouble,
lineGroove,
lineRidge,
lineInset,
lineOutset,
} from '@wordpress/icons';
import { __ } from '@wordpress/i18n';

/**
Expand All @@ -18,6 +27,11 @@ const BORDER_STYLES = [
{ label: __( 'Solid' ), icon: lineSolid, value: 'solid' },
{ label: __( 'Dashed' ), icon: lineDashed, value: 'dashed' },
{ label: __( 'Dotted' ), icon: lineDotted, value: 'dotted' },
{ label: __( 'Double' ), icon: lineDouble, value: 'double' },
{ label: __( 'Groove' ), icon: lineGroove, value: 'groove' },
{ label: __( 'Ridge' ), icon: lineRidge, value: 'ridge' },
{ label: __( 'Inset' ), icon: lineInset, value: 'inset' },
{ label: __( 'Outset' ), icon: lineOutset, value: 'outset' },
];

function UnconnectedBorderControlStylePicker(
Expand All @@ -34,6 +48,7 @@ function UnconnectedBorderControlStylePicker(
onChange?.( value as string | undefined );
} }
{ ...restProps }
style={ { display: 'flex' } }
>
{ BORDER_STYLES.map( ( borderStyle ) => (
<ToggleGroupControlOptionIcon
Expand Down
5 changes: 5 additions & 0 deletions packages/icons/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,11 @@ 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 lineDouble } from './library/line-double';
export { default as lineGroove } from './library/line-groove';
export { default as lineRidge } from './library/line-ridge';
export { default as lineInset } from './library/line-inset';
export { default as lineOutset } from './library/line-outset';
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-double.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* WordPress dependencies
*/
import { Path, SVG } from '@wordpress/primitives';

const lineDouble = (
<SVG xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<Path
fillRule="evenodd"
d="M4 10h16v1H4v-1zm0 3h16v1H4v-1z"
clipRule="evenodd"
/>
</SVG>
);

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

const lineGroove = (
<SVG xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<Path
fillRule="evenodd"
d="M4 10h16v1H4v-1zM5 11h14v1H5v-1z"
clipRule="evenodd"
/>
</SVG>
);

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

const lineInset = (
<SVG xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<Path
fillRule="evenodd"
d="M4 10h16v1H4v-1zM5 11h14v1H5v-1zM6 12h12v1H6v-1zM7 13h10v1H7v-1z"
clipRule="evenodd"
/>
</SVG>
);

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

const lineOutset = (
<SVG xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<Path
fillRule="evenodd"
d="M4 10h16v1H4v-1zM3 11h18v1H3v-1zM2 12h20v1H2v-1z"
clipRule="evenodd"
/>
</SVG>
);

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

const lineRidge = (
<SVG xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<Path
fillRule="evenodd"
d="M4 10h16v1H4v-1zM5 11h14v1H5v-1zM6 12h12v1H6v-1z"
clipRule="evenodd"
/>
</SVG>
);

export default lineRidge;
Loading