-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use segmented control for border style control
- Loading branch information
1 parent
8ed4bf1
commit 6500f68
Showing
3 changed files
with
70 additions
and
22 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
packages/block-editor/src/components/border-style-control/icons.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { Path, SVG } from '@wordpress/components'; | ||
|
||
export const solidIcon = ( | ||
<SVG xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none"> | ||
<Path d="M5 11.25h14v1.5H5z" /> | ||
</SVG> | ||
); | ||
|
||
export const dashedIcon = ( | ||
<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 const dottedIcon = ( | ||
<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> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 12 additions & 9 deletions
21
packages/block-editor/src/components/border-style-control/style.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
.components-border-style-control__select { | ||
margin-bottom: 24px; | ||
|
||
button { | ||
width: 100%; | ||
.components-border-style-control { | ||
legend { | ||
padding-bottom: $grid-unit-05; | ||
} | ||
|
||
ul { | ||
li, | ||
li:last-child { | ||
margin: 6px; | ||
.components-border-style-control__buttons { | ||
display: inline-flex; | ||
margin-bottom: $grid-unit-30; | ||
|
||
.components-button.has-icon { | ||
min-width: 30px; | ||
height: 30px; | ||
padding: 3px; | ||
margin-right: $grid-unit-05; | ||
} | ||
} | ||
} |