1- // Import the component markup template
21import { Template } from "./template" ;
2+ import { html } from 'lit' ;
33
4- // More on default export: https://storybook.js.org/docs/web-components/writing-stories/introduction#default-export
54export default {
6- title : "Components/background layers" ,
7- description : "The background layers component is.. ." ,
5+ title : "Elements/Background layers" ,
6+ description : "The background layers is a series of classes used to style background layers ." ,
87 component : "BackgroundLayers" ,
98 argTypes : {
10- size : {
11- name : "Size " ,
9+ context : {
10+ name : "Context " ,
1211 type : { name : "string" , required : true } ,
13- defaultValue : "m " ,
12+ defaultValue : "Browsing " ,
1413 table : {
1514 type : { summary : "string" } ,
1615 category : "Component" ,
17- defaultValue : { summary : "m " }
16+ defaultValue : { summary : "browsing " }
1817 } ,
19- options : [ "s " , "m" , "l" , "xl "] ,
18+ options : [ "browsing " , "editing " ] ,
2019 control : "select"
2120 } ,
2221 } ,
23- // More on args: https://storybook.js.org/docs/web-components/writing-stories/args
2422 args : {
2523 rootClass : "spectrum-BackgroundLayers" ,
26- size : "m" ,
2724 } ,
2825 parameters : {
2926 actions : {
@@ -35,5 +32,51 @@ export default {
3532 }
3633} ;
3734
38- export const Default = Template . bind ( { } ) ;
39- Default . args = { } ;
35+ const EditingContext = ( {
36+ } ) => {
37+ return html `
38+ < div style ="display: flex; justify-content: flex-start; position: relative; ">
39+ ${ Template ( {
40+ style : "z-index: 4;" ,
41+ layer : 'elevated' ,
42+ } ) }
43+ ${ Template ( {
44+ style : "z-index: 3; inset-inline-start: 15px; inset-block-start: 15px;" ,
45+ layer : 'layer2' ,
46+ } ) }
47+ ${ Template ( {
48+ style : "z-index: 2; inset-inline-start: 25px; inset-block-start: 25px;" ,
49+ layer : 'layer1' ,
50+ } ) }
51+ ${ Template ( {
52+ style : "z-index: 1; inset-inline-start: 35px; inset-block-start: 35px;" ,
53+ layer : "pasteboard" ,
54+ } ) }
55+ </ div >
56+ ` ;
57+ } ;
58+
59+ const BrowsingContext = ( {
60+ } ) => {
61+ return html `
62+ < div style ="display: flex; justify-content: flex-start; position: relative; ">
63+ ${ Template ( {
64+ style : "z-index: 3;" ,
65+ layer : 'elevated' ,
66+ } ) }
67+ ${ Template ( {
68+ style : "z-index: 2; inset-inline-start: 15px; inset-block-start: 15px;" ,
69+ layer : 'layer1' ,
70+ } ) }
71+ ${ Template ( {
72+ style : "z-index: 1; inset-inline-start: 25px; inset-block-start: 25px;" ,
73+ layer : "base" ,
74+ } ) }
75+ </ div >
76+ ` ;
77+ } ;
78+ export const Editing = EditingContext . bind ( { } ) ;
79+ Editing . args = { } ;
80+
81+ export const Browsing = BrowsingContext . bind ( { } ) ;
82+ Browsing . args = { } ;
0 commit comments