Skip to content

Commit a5f57f5

Browse files
committed
fix: 변경 사항으로 인한 alert_use_case.dart 에러 수정
1 parent 2f1657d commit a5f57f5

1 file changed

Lines changed: 12 additions & 10 deletions

File tree

packages/widgetbook/lib/src/component/popup/alert_use_case.dart

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,6 @@ Widget buildGdsAlertUseCase(BuildContext context) {
1414
}
1515

1616
Widget _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

Comments
 (0)