1
- // Import the component markup template
2
1
import { Template } from "./template" ;
2
+ import { html } from 'lit' ;
3
3
4
- // More on default export: https://storybook.js.org/docs/web-components/writing-stories/introduction#default-export
5
4
export 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 ." ,
8
7
component : "BackgroundLayers" ,
9
8
argTypes : {
10
- size : {
11
- name : "Size " ,
9
+ context : {
10
+ name : "Context " ,
12
11
type : { name : "string" , required : true } ,
13
- defaultValue : "m " ,
12
+ defaultValue : "Browsing " ,
14
13
table : {
15
14
type : { summary : "string" } ,
16
15
category : "Component" ,
17
- defaultValue : { summary : "m " }
16
+ defaultValue : { summary : "browsing " }
18
17
} ,
19
- options : [ "s " , "m" , "l" , "xl "] ,
18
+ options : [ "browsing " , "editing " ] ,
20
19
control : "select"
21
20
} ,
22
21
} ,
23
- // More on args: https://storybook.js.org/docs/web-components/writing-stories/args
24
22
args : {
25
23
rootClass : "spectrum-BackgroundLayers" ,
26
- size : "m" ,
27
24
} ,
28
25
parameters : {
29
26
actions : {
@@ -35,5 +32,51 @@ export default {
35
32
}
36
33
} ;
37
34
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