-
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.
- Loading branch information
Showing
13 changed files
with
813 additions
and
428 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { | ||
__experimentalHStack as HStack, | ||
SearchControl, | ||
__experimentalToggleGroupControl as ToggleGroupControl, | ||
__experimentalToggleGroupControlOptionIcon as ToggleGroupControlOptionIcon, | ||
} from '@wordpress/components'; | ||
import { menu, grid } from '@wordpress/icons'; | ||
/** | ||
* Internal dependencies | ||
*/ | ||
|
||
export default function FilterBar() { | ||
return ( | ||
<HStack | ||
className="edit-site-page-filter-bar" | ||
spacing={ 3 } | ||
alignment="left" | ||
> | ||
<SearchControl | ||
className="edit-site-page-filter-bar__search" | ||
label="Search templates..." | ||
placeholder="Search templates..." | ||
/> | ||
<ToggleGroupControl | ||
__nextHasNoMarginBottom | ||
label="view type" | ||
value="list" | ||
isBlock | ||
size="__unstable-large" | ||
hideLabelFromVision | ||
> | ||
<ToggleGroupControlOptionIcon | ||
icon={ menu } | ||
value="list" | ||
label="List" | ||
/> | ||
<ToggleGroupControlOptionIcon | ||
icon={ grid } | ||
value="grid" | ||
label="Grid" | ||
/> | ||
</ToggleGroupControl> | ||
</HStack> | ||
); | ||
} |
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,37 @@ | ||
.edit-site-page-filter-bar { | ||
margin-bottom: $grid-unit-30; | ||
.components-text-control__input { | ||
background: $gray-800; | ||
border: 1px solid $gray-700; | ||
color: $gray-100; | ||
} | ||
.components-toggle-group-control { | ||
border: none; | ||
background: $gray-800; | ||
box-shadow: none; | ||
} | ||
.components-base-control__field { | ||
margin: 0; | ||
.components-toggle-group-control-option-base { | ||
color: $gray-400; | ||
} | ||
} | ||
} | ||
|
||
.edit-site-page-filter-bar__search { | ||
flex-grow: 1; | ||
svg { | ||
fill: $gray-400; | ||
} | ||
input[type="search"].components-search-control__input { | ||
background: $gray-800; | ||
color: $gray-100; | ||
height: 40px; | ||
border: none; | ||
&:focus { | ||
background: $gray-800; | ||
border: 1px solid $gray-700; | ||
box-shadow: none; | ||
} | ||
} | ||
} |
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
24 changes: 24 additions & 0 deletions
24
packages/edit-site/src/components/page-main-templates/index.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,24 @@ | ||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { Button } from '@wordpress/components'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import Page from '../page'; | ||
import FilterBar from '../filter-bar'; | ||
import Table from '../table'; | ||
|
||
export default function PageMainTemplates() { | ||
return ( | ||
<Page | ||
title="Templates" | ||
subTitle="Manage all your templates" | ||
actions={ <Button variant="primary">New Template</Button> } | ||
> | ||
<FilterBar /> | ||
<Table /> | ||
</Page> | ||
); | ||
} |
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,36 @@ | ||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { | ||
__experimentalHeading as Heading, | ||
__experimentalText as Text, | ||
__experimentalHStack as HStack, | ||
FlexBlock, | ||
FlexItem, | ||
} from '@wordpress/components'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
|
||
export default function Header( { title, subTitle, actions } ) { | ||
return ( | ||
<HStack as="header" alignment="left" className="edit-site-page-header"> | ||
<FlexBlock className="edit-site-page-header__page-title"> | ||
<Heading | ||
has="h1" | ||
This comment has been minimized.
Sorry, something went wrong. |
||
level={ 3 } | ||
className="edit-site-page-header__title" | ||
> | ||
{ title } | ||
</Heading> | ||
<Text as="p" className="edit-site-page-header__sub-title"> | ||
{ subTitle } | ||
</Text> | ||
</FlexBlock> | ||
<FlexItem className="edit-site-page-header__actions"> | ||
{ actions } | ||
</FlexItem> | ||
</HStack> | ||
); | ||
} |
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,19 @@ | ||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { __experimentalVStack as VStack } from '@wordpress/components'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
|
||
import Header from './header'; | ||
|
||
export default function Page( { title, subTitle, actions, children } ) { | ||
return ( | ||
<VStack spacing={ 0 } className="edit-site-page"> | ||
<Header title={ title } subTitle={ subTitle } actions={ actions } /> | ||
<div className="edit-site-page-content">{ children }</div> | ||
</VStack> | ||
); | ||
} |
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,20 @@ | ||
.edit-site-page { | ||
color: $gray-400; | ||
} | ||
|
||
.edit-site-page-header { | ||
padding: $grid-unit-40; | ||
.components-text { | ||
color: $gray-400; | ||
} | ||
.components-heading { | ||
color: $gray-100; | ||
} | ||
.edit-site-page-header__sub-title { | ||
margin-top: $grid-unit-10; | ||
} | ||
} | ||
|
||
.edit-site-page-content { | ||
padding: 0 $grid-unit-40 $grid-unit-40; | ||
} |
Oops, something went wrong.
@SaxonF Potential typo (did you mean
as
)?