@@ -14,12 +14,6 @@ Widget buildGdsAlertUseCase(BuildContext context) {
1414}
1515
1616Widget _buildPlaygroundSection (BuildContext context) {
17- final type = context.knobs.list <GdsAlertType >(
18- label: 'type' ,
19- options: GdsAlertType .values,
20- labelBuilder: (v) => v.name,
21- );
22-
2317 final size = context.knobs.list <GdsAlertSize >(
2418 label: 'size' ,
2519 options: GdsAlertSize .values,
@@ -36,20 +30,28 @@ Widget _buildPlaygroundSection(BuildContext context) {
3630 initialValue: '상황에 대한 설명이 들어가요.\n 설명은 최대 2줄까지만 작성해요.' ,
3731 );
3832
33+ final primary = context.knobs.boolean (
34+ label: 'primaryButton' ,
35+ initialValue: true ,
36+ );
37+
38+ final secondary = context.knobs.boolean (
39+ label: 'secondaryButton' ,
40+ initialValue: true ,
41+ );
42+
3943 return WidgetbookPlayground (
4044 info: [
41- 'type: ${type .name }' ,
4245 'size: ${size .name }' ,
4346 'title: $title }' ,
4447 'description: $description ' ,
4548 ],
4649 child: GdsAlert (
47- type: type,
4850 size: size,
4951 title: title,
5052 description: description,
51- onPrimaryTap: () => debugPrint ('Primary Tapped' ),
52- onSecondaryTap: () => debugPrint ('Secondary Tapped' ),
53+ onPrimaryTap: primary ? () => debugPrint ('Primary Tapped' ) : null ,
54+ onSecondaryTap: secondary ? () => debugPrint ('Secondary Tapped' ) : null ,
5355 ),
5456 );
5557}
0 commit comments