Skip to content

Commit

Permalink
Icons: Add new home icon.
Browse files Browse the repository at this point in the history
  • Loading branch information
epiqueras committed May 4, 2020
1 parent b93715b commit 631bac2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 deletions.
21 changes: 4 additions & 17 deletions packages/edit-site/src/components/template-switcher/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ import {
MenuGroup,
MenuItemsChoice,
MenuItem,
SVG,
Path,
} from '@wordpress/components';
import { plus } from '@wordpress/icons';
import { Icon, home, plus } from '@wordpress/icons';

/**
* Internal dependencies
Expand All @@ -22,26 +20,15 @@ import AddTemplate from '../add-template';
import TemplatePreview from './template-preview';
import ThemePreview from './theme-preview';

const HomeIcon = () => (
<SVG
width="24"
height="24"
viewBox="-6 -6 24 24"
xmlns="http://www.w3.org/2000/svg"
>
<Path
d="M9.5 4V9.5H6.75V6.25V5.75H6.25H3.75H3.25V6.25V9.5H0.5V4L5 0.625L9.5 4Z"
stroke="black"
/>
</SVG>
);
function TemplateLabel( { template, homeId } ) {
return (
<>
{ template.slug }{ ' ' }
{ template.id === homeId && (
<Tooltip text={ __( 'Home' ) }>
<HomeIcon />
<div className="edit-site-template-switcher__label-home-icon">
<Icon icon={ home } />
</div>
</Tooltip>
) }
{ template.status !== 'auto-draft' && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
position: relative;
}

.edit-site-template-switcher__label-home-icon {
width: 24px;
height: 24px;
position: absolute;
right: 20px;
}

.edit-site-template-switcher__label-customized-dot {
position: absolute;
right: 4px;
Expand Down

0 comments on commit 631bac2

Please sign in to comment.