Skip to content

Commit

Permalink
feat: added onTap to widgetbook
Browse files Browse the repository at this point in the history
  • Loading branch information
DE7924 committed Nov 7, 2024
1 parent ce65794 commit 822bb0c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions example/widgetbook/pages/components/chip_widgetbook.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Widget inputChipUseCase(BuildContext context) {

return WidgetbookScaffold(
builder: (context, _) => ZetaInputChip(
onTap: context.knobs.boolean(label: 'Selectable', initialValue: true) ? () {} : null,
label: context.knobs.string(label: 'Label', initialValue: 'Label'),
leading: context.knobs.boolean(label: 'Avatar', initialValue: true)
? ZetaAvatar(
Expand All @@ -26,6 +27,7 @@ Widget inputChipUseCase(BuildContext context) {

Widget filterChipUseCase(BuildContext context) => WidgetbookScaffold(
builder: (context, _) => ZetaFilterChip(
onTap: context.knobs.boolean(label: 'Selectable', initialValue: true) ? (value) {} : null,
label: context.knobs.string(label: 'Label', initialValue: 'Label'),
selected: context.knobs.boolean(label: 'Selected', initialValue: true),
),
Expand All @@ -34,6 +36,7 @@ Widget filterChipUseCase(BuildContext context) => WidgetbookScaffold(
Widget assistChipUseCase(BuildContext context) {
return WidgetbookScaffold(
builder: (context, _) => ZetaAssistChip(
onTap: context.knobs.boolean(label: 'Selectable', initialValue: true) ? () {} : null,
label: context.knobs.string(label: 'Label', initialValue: 'Label'),
leading: ZetaIcon(iconKnob(context)),
),
Expand Down

0 comments on commit 822bb0c

Please sign in to comment.