-
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.
Extract the three color panels to their own global styles view (#35400)
- Loading branch information
1 parent
17ca382
commit d78b271
Showing
12 changed files
with
330 additions
and
102 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
packages/edit-site/src/components/global-styles/color-utils.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,15 @@ | ||
/** | ||
* Internal dependencies | ||
*/ | ||
|
||
import { getSupportedGlobalStylesPanels } from './hooks'; | ||
|
||
export function useHasColorPanel( name ) { | ||
const supports = getSupportedGlobalStylesPanels( name ); | ||
return ( | ||
supports.includes( 'color' ) || | ||
supports.includes( 'backgroundColor' ) || | ||
supports.includes( 'background' ) || | ||
supports.includes( 'linkColor' ) | ||
); | ||
} |
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
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.