-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move shadow into newly created effects panel
- Loading branch information
1 parent
d9da125
commit abffa6e
Showing
4 changed files
with
46 additions
and
7 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={ __( 'Effects' ) } /> | ||
<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