@@ -7,9 +7,6 @@ import { Toggle } from '../Toggle';
7
7
8
8
import {
9
9
SidePanel ,
10
- SidePanelContent ,
11
- SidePanelFooter ,
12
- SidePanelHeader ,
13
10
sidePanelPropPosition ,
14
11
type SidePanelProps ,
15
12
sidePanelPropSize ,
@@ -18,7 +15,11 @@ import {
18
15
const meta = {
19
16
title : 'Components/SidePanel' ,
20
17
component : SidePanel ,
21
- subcomponents : { SidePanelHeader, SidePanelContent, SidePanelFooter } ,
18
+ subcomponents : {
19
+ 'SidePanel.Header' : SidePanel . Header ,
20
+ 'SidePanel.Body' : SidePanel . Body ,
21
+ 'SidePanel.Footer' : SidePanel . Footer ,
22
+ } ,
22
23
parameters : {
23
24
layout : 'centered' ,
24
25
} ,
@@ -37,10 +38,10 @@ export const Base: Story = {
37
38
>
38
39
{ ( { close } ) => (
39
40
< >
40
- < SidePanelHeader >
41
+ < SidePanel . Header >
41
42
Web Security: Safeguarding the Digital World
42
- </ SidePanelHeader >
43
- < SidePanelContent >
43
+ </ SidePanel . Header >
44
+ < SidePanel . Body >
44
45
< FlexBox gap = "m" direction = "column" >
45
46
< span >
46
47
Web security is a crucial aspect of modern digital
@@ -87,13 +88,13 @@ export const Base: Story = {
87
88
and data in an increasingly connected world.
88
89
</ span >
89
90
</ FlexBox >
90
- </ SidePanelContent >
91
- < SidePanelFooter >
91
+ </ SidePanel . Body >
92
+ < SidePanel . Footer >
92
93
< Button onPress = { close } > Ok</ Button >
93
94
< Button variant = "fade-contrast-filled" onPress = { close } >
94
95
Cancel
95
96
</ Button >
96
- </ SidePanelFooter >
97
+ </ SidePanel . Footer >
97
98
</ >
98
99
) }
99
100
</ SidePanel >
@@ -114,13 +115,11 @@ export const Size: Story = {
114
115
>
115
116
{ ( { close } ) => (
116
117
< >
117
- < SidePanelHeader > I have a { size } size</ SidePanelHeader >
118
- < SidePanelContent >
119
- But there's nothing to say…
120
- </ SidePanelContent >
121
- < SidePanelFooter >
118
+ < SidePanel . Header > I have a { size } size</ SidePanel . Header >
119
+ < SidePanel . Body > But there's nothing to say…</ SidePanel . Body >
120
+ < SidePanel . Footer >
122
121
< Button onPress = { close } > Ok</ Button >
123
- </ SidePanelFooter >
122
+ </ SidePanel . Footer >
124
123
</ >
125
124
) }
126
125
</ SidePanel >
@@ -145,13 +144,13 @@ export const Position: Story = {
145
144
>
146
145
{ ( { close } ) => (
147
146
< >
148
- < SidePanelHeader > I have a { position } position </ SidePanelHeader >
149
- < SidePanelContent >
150
- But there's nothing to say…
151
- </ SidePanelContent >
152
- < SidePanelFooter >
147
+ < SidePanel . Header >
148
+ I have a { position } position
149
+ </ SidePanel . Header >
150
+ < SidePanel . Body > But there's nothing to say… </ SidePanel . Body >
151
+ < SidePanel . Footer >
153
152
< Button onPress = { close } > Ok</ Button >
154
- </ SidePanelFooter >
153
+ </ SidePanel . Footer >
155
154
</ >
156
155
) }
157
156
</ SidePanel >
@@ -170,10 +169,10 @@ export const ControlledOpen: Story = {
170
169
< >
171
170
< Button onPress = { on } > Open</ Button >
172
171
< SidePanel open = { open } size = "small" onOpenChange = { set } { ...args } >
173
- < SidePanelHeader >
172
+ < SidePanel . Header >
174
173
Web Security: Safeguarding the Digital World
175
- </ SidePanelHeader >
176
- < SidePanelContent >
174
+ </ SidePanel . Header >
175
+ < SidePanel . Body >
177
176
< FlexBox gap = "m" direction = "column" >
178
177
< span >
179
178
Web security is a crucial aspect of modern digital
@@ -219,13 +218,13 @@ export const ControlledOpen: Story = {
219
218
data in an increasingly connected world.
220
219
</ span >
221
220
</ FlexBox >
222
- </ SidePanelContent >
223
- < SidePanelFooter >
221
+ </ SidePanel . Body >
222
+ < SidePanel . Footer >
224
223
< Button onPress = { off } > Ok</ Button >
225
224
< Button variant = "fade-contrast-filled" onPress = { off } >
226
225
Cancel
227
226
</ Button >
228
- </ SidePanelFooter >
227
+ </ SidePanel . Footer >
229
228
</ SidePanel >
230
229
</ >
231
230
) ;
@@ -254,8 +253,8 @@ export const Settings: Story = {
254
253
>
255
254
{ ( { close } ) => (
256
255
< >
257
- < SidePanelHeader > Adjust me</ SidePanelHeader >
258
- < SidePanelContent >
256
+ < SidePanel . Header > Adjust me</ SidePanel . Header >
257
+ < SidePanel . Body >
259
258
< FlexBox gap = "l" direction = "column" >
260
259
< Toggle
261
260
checked = { hideBackdrop }
@@ -282,10 +281,10 @@ export const Settings: Story = {
282
281
Disable the exit by pressing ESC key
283
282
</ Toggle >
284
283
</ FlexBox >
285
- </ SidePanelContent >
286
- < SidePanelFooter >
284
+ </ SidePanel . Body >
285
+ < SidePanel . Footer >
287
286
< Button onPress = { close } > Ok</ Button >
288
- </ SidePanelFooter >
287
+ </ SidePanel . Footer >
289
288
</ >
290
289
) }
291
290
</ SidePanel >
0 commit comments