-
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.
Add a help panel to the inserter available in all blocks (#16813)
- Loading branch information
1 parent
e33d5ac
commit 5482398
Showing
24 changed files
with
345 additions
and
190 deletions.
There are no files selected for viewing
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
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,18 @@ | ||
/** | ||
* Internal dependencies | ||
*/ | ||
import BlockIcon from '../block-icon'; | ||
|
||
function BlockCard( { blockType } ) { | ||
return ( | ||
<div className="block-editor-block-card"> | ||
<BlockIcon icon={ blockType.icon } showColors /> | ||
<div className="block-editor-block-card__content"> | ||
<div className="block-editor-block-card__title">{ blockType.title }</div> | ||
<div className="block-editor-block-card__description">{ blockType.description }</div> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
export default BlockCard; |
34 changes: 34 additions & 0 deletions
34
packages/block-editor/src/components/block-card/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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
.block-editor-block-card { | ||
display: flex; | ||
align-items: flex-start; | ||
} | ||
|
||
.block-editor-block-card__icon { | ||
border: $border-width solid $light-gray-700; | ||
padding: 7px; | ||
margin-right: 10px; | ||
height: 36px; | ||
width: 36px; | ||
} | ||
|
||
.block-editor-block-card__content { | ||
flex-grow: 1; | ||
} | ||
|
||
.block-editor-block-card__title { | ||
font-weight: 500; | ||
margin-bottom: 5px; | ||
} | ||
|
||
.block-editor-block-card__description { | ||
font-size: $default-font-size; | ||
} | ||
|
||
.block-editor-block-card .block-editor-block-icon { | ||
margin-left: -2px; | ||
margin-right: 10px; | ||
padding: 0 3px; | ||
width: $icon-button-size; | ||
height: $icon-button-size-small; | ||
} |
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
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
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
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
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
Oops, something went wrong.