-
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.
Shadow: move shadow to own panel (#47634)
* move shadow into newly created effects panel * rename effects to shadow * rename label shadows to shadow in popover
- Loading branch information
1 parent
d113597
commit 5535a3a
Showing
5 changed files
with
48 additions
and
8 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
28 changes: 28 additions & 0 deletions
28
packages/edit-site/src/components/global-styles/screen-effects.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,28 @@ | ||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { __ } from '@wordpress/i18n'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import ScreenHeader from './header'; | ||
import BlockPreviewPanel from './block-preview-panel'; | ||
import { getVariationClassName } from './utils'; | ||
import ShadowPanel, { useHasShadowControl } from './shadow-panel'; | ||
|
||
function ScreenEffects( { name, variation = '' } ) { | ||
const variationClassName = getVariationClassName( variation ); | ||
const hasShadowPanel = useHasShadowControl( name ); | ||
return ( | ||
<> | ||
<ScreenHeader title={ __( 'Shadow' ) } /> | ||
<BlockPreviewPanel name={ name } variation={ variationClassName } /> | ||
{ hasShadowPanel && ( | ||
<ShadowPanel name={ name } variation={ variation } /> | ||
) } | ||
</> | ||
); | ||
} | ||
|
||
export default ScreenEffects; |
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
5535a3a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flaky tests detected in 5535a3a.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.
🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4076521673
📝 Reported issues:
specs/editor/various/multi-block-selection.test.js