This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 219
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
16 changed files
with
502 additions
and
315 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/** | ||
* Internal dependencies | ||
*/ | ||
import './style.scss'; | ||
|
||
export { default as Sidebar } from './sidebar'; | ||
export { default as Main } from './main'; | ||
export { default as SidebarLayout } from './sidebar-layout'; |
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,14 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import classNames from 'classnames'; | ||
|
||
const Main = ( { children, className } ) => { | ||
return ( | ||
<div className={ classNames( 'wc-block-main', className ) }> | ||
{ children } | ||
</div> | ||
); | ||
}; | ||
|
||
export default Main; |
14 changes: 14 additions & 0 deletions
14
assets/js/base/components/sidebar-layout/sidebar-layout.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,14 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import classNames from 'classnames'; | ||
|
||
const SidebarLayout = ( { children, className } ) => { | ||
return ( | ||
<div className={ classNames( 'wc-block-sidebar-layout', className ) }> | ||
{ children } | ||
</div> | ||
); | ||
}; | ||
|
||
export default SidebarLayout; |
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,14 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import classNames from 'classnames'; | ||
|
||
const Sidebar = ( { children, className } ) => { | ||
return ( | ||
<div className={ classNames( 'wc-block-sidebar', className ) }> | ||
{ children } | ||
</div> | ||
); | ||
}; | ||
|
||
export default Sidebar; |
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,86 @@ | ||
.wc-block-sidebar-layout { | ||
display: flex; | ||
flex-wrap: wrap; | ||
margin: 0 (-$gap) $gap; | ||
|
||
.wc-block-main { | ||
flex: 1 0 65%; | ||
margin: 0; | ||
padding: 0 $gap; | ||
min-width: 500px; | ||
} | ||
|
||
.wc-block-sidebar { | ||
flex: 1 1 35%; | ||
margin: 0; | ||
max-width: 35%; | ||
padding: 0 $gap; | ||
|
||
// Reset Gutenberg <Panel> styles when used in the sidebar. | ||
.components-panel__body { | ||
border-top: 1px solid $core-grey-light-600; | ||
border-bottom: 1px solid $core-grey-light-600; | ||
|
||
&.is-opened { | ||
padding-left: 0; | ||
padding-right: 0; | ||
|
||
> .components-panel__body-title { | ||
margin-left: 0; | ||
margin-right: 0; | ||
} | ||
} | ||
|
||
> .components-panel__body-title, | ||
.components-panel__body-toggle { | ||
&, | ||
&:hover, | ||
&:focus, | ||
&:active { | ||
background-color: transparent; | ||
color: inherit; | ||
} | ||
} | ||
|
||
.components-panel__body-toggle { | ||
font-weight: normal; | ||
font-size: inherit; | ||
padding-left: 0; | ||
padding-right: 36px; | ||
|
||
&.components-button, | ||
&.components-button:focus:not(:disabled):not([aria-disabled="true"]) { | ||
color: inherit; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
@include breakpoint( "<782px" ) { | ||
.wc-block-sidebar-layout { | ||
display: block; | ||
margin: 0 0 $gap; | ||
|
||
.wc-block-main { | ||
padding: 0; | ||
flex: none; | ||
min-width: 200px; | ||
} | ||
.wc-block-sidebar { | ||
padding: 0; | ||
flex: none; | ||
max-width: 100%; | ||
|
||
// Reset (remove) totals "card" styling on mobile. | ||
.components-card { | ||
box-shadow: none; | ||
border: none; | ||
} | ||
.components-card__body { | ||
border: none; | ||
padding: 0; | ||
} | ||
} | ||
} | ||
} |
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.