-
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
c98e7f5
commit b13b4a5
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