Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the Global Styles Icon and use in the site editor's panel #34871

Merged
merged 1 commit into from
Sep 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/edit-site/src/components/sidebar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import { createSlotFill, PanelBody } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
import { cog, typography } from '@wordpress/icons';
import { cog, globalStyles } from '@wordpress/icons';
import { useEffect } from '@wordpress/element';
import { useSelect, useDispatch } from '@wordpress/data';
import { store as interfaceStore } from '@wordpress/interface';
Expand Down Expand Up @@ -80,7 +80,7 @@ export function SidebarComplementaryAreaFills() {
identifier="edit-site/global-styles"
title={ __( 'Global Styles' ) }
closeLabel={ __( 'Close global styles sidebar' ) }
icon={ typography }
icon={ globalStyles }
/>
</>
);
Expand Down
1 change: 1 addition & 0 deletions packages/icons/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export { default as formatUnderline } from './library/format-underline';
export { default as formatUppercase } from './library/format-uppercase';
export { default as fullscreen } from './library/fullscreen';
export { default as gallery } from './library/gallery';
export { default as globalStyles } from './library/global-styles';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonder if we should be calling this one just styles

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've no strong opinion. I case we want to do it, here's a PR. The argument for calling it "global styles" was that it feels like a branded symbol that should not be used for any other interface.

export { default as globe } from './library/globe';
export { default as grid } from './library/grid';
export { default as group } from './library/group';
Expand Down
12 changes: 12 additions & 0 deletions packages/icons/src/library/global-styles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* WordPress dependencies
*/
import { Path, SVG } from '@wordpress/primitives';

export const globalStyles = (
<SVG viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<Path d="M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z" />
</SVG>
);

export default globalStyles;