mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 20:19:13 +00:00
adding layout examples
This commit is contained in:
@@ -5,16 +5,47 @@ meta:
|
||||
layout: component
|
||||
---
|
||||
|
||||
```html preview
|
||||
<wa-layout></wa-layout>
|
||||
The layout component is intended for full page usage, but is shown here in a smaller format for easier previewing.
|
||||
|
||||
The layout component does not implement any internal semantic elements because we don't want to assume what content you will be using.
|
||||
|
||||
Layouts are best in the dedicate [layouts section](/layouts/index.html)
|
||||
|
||||
```html:preview
|
||||
<style>
|
||||
wa-layout::part(header) {
|
||||
border-bottom: 1px solid var(--wa-color-neutral-outline-muted-alt);
|
||||
background-color: var(--wa-color-white);
|
||||
}
|
||||
|
||||
/* Override global styles */
|
||||
wa-layout main {
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
<wa-layout main-id="content" style="max-height: 500px; overflow: auto;">
|
||||
<header slot="header">
|
||||
Header
|
||||
</header>
|
||||
|
||||
<nav aria-label="Main Navigation" slot="navigation">
|
||||
<ul style="list-style-type: ' '";>
|
||||
<li><wa-button variant="link" href="#">Home</wa-button></li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<main id="content">
|
||||
Main Content
|
||||
</main>
|
||||
|
||||
<div slot="aside">
|
||||
Aside
|
||||
</div>
|
||||
|
||||
<footer slot="footer">
|
||||
Footer
|
||||
</footer>
|
||||
</wa-layout>
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### First Example
|
||||
|
||||
TODO
|
||||
|
||||
### Second Example
|
||||
|
||||
TODO
|
||||
@@ -52,7 +52,7 @@ import type { CSSResultGroup, PropertyValueMap } from 'lit';
|
||||
* @cssproperty [--header-height=0px] - This gets auto-calculated when the layout connects. If you know the height of your header, you can optionally set this to the proper value to prevent shifting.
|
||||
* @cssproperty [--sub-header-height=0px] - This gets auto-calculated when the layout connects. If you know the height of your sub-header, you can optionally set this to the proper value to prevent shifting.
|
||||
*/
|
||||
export default class SlLayout extends WebAwesomeElement {
|
||||
export default class WaLayout extends WebAwesomeElement {
|
||||
static styles: CSSResultGroup = styles;
|
||||
static dependencies = {
|
||||
'wa-button': WaButton,
|
||||
|
||||
Reference in New Issue
Block a user