Skip to content

Commit

Permalink
Component dialog (#22)
Browse files Browse the repository at this point in the history
* chore: update contributing

* fix: Fix button group immutability (#1)

* Fix errors

* fix copywith function

* [automated commit] lint format and import sort

---------

Co-authored-by: Osman <AO3856@zebra.com>
Co-authored-by: github-actions <github-actions@github.com>

* [automated commit] lint format and import sort

* update on-main to push to firebase (#3)

* ci: move firebase to flutter main host for qa (#4)

* feat: Add List Item (#5)

* feat: Add List Item

* [automated commit] lint format and import sort

---------

Co-authored-by: Simeon Dimitrov <simeon.dimitrov.work@gmail.com>
Co-authored-by: github-actions <github-actions@github.com>

* fix(main): ListItem disabled color (#8)

* fix(main): ListItem disabled color

* [automated commit] lint format and import sort

---------

Co-authored-by: github-actions <github-actions@github.com>

* feat : Dropdown menu (#7)

* Create dropdown

* Add sizes

* create stoyrybook and add size

* Fix errrs and respond to comments

* Fix issues

* [automated commit] lint format and import sort

* Alter isLarge

* Fix spacing

* [automated commit] lint format and import sort

* Alter leading styles

* [automated commit] lint format and import sort

---------

Co-authored-by: Osman <AO3856@zebra.com>
Co-authored-by: github-actions <github-actions@github.com>

* Component ZetaSwitch (#6)

* create ZetaSwitch

* ZetaSwitch using MaterialSwitch

* widgetbook for ZetaSwitch

* remove hover; fix initState

* add showHover parameter

* add comments 'Zeta change' in material_switch.dart

* remove size parameter and factory constructors

* fix example and widgetbook

* Component Zeta Radio Button (#9)

* create component Zeta Radio Button

* remove hover color

* fix label line height

* feat(main): SnackBar (#10)

* add snackbar example

* Add snackbar widgetbook

* feat(main): SnackBar

* [automated commit] lint format and import sort

* remove view icon

* Add view icon

* Add widgetbook icon helper

* [automated commit] lint format and import sort

* fix alphabetical imports

* Fix delete and error background color

---------

Co-authored-by: github-actions <github-actions@github.com>

* feat(main): Tabs (#11)

* feat(main): Tabs

* [automated commit] lint format and import sort

---------

Co-authored-by: github-actions <github-actions@github.com>

* chore: Update text styles (#13)

* fix: switch on web (#14)

* Component date input (#12)

* create ZetaDateInput

* create different ZetaDateInput variants

* fix show error style

* date validation and input mask; documentation for ZetaDateInput properties

* create widgetbook

* changes according to comments

* create showZetaDialog

* finished dialog for DeviceType.mobilePortrait

* Component date input (#16)

* create ZetaDateInput

* create different ZetaDateInput variants

* fix show error style

* date validation and input mask; documentation for ZetaDateInput properties

* create widgetbook

* changes according to comments

* fix Typography of Date Input

* restore

* remove text line height

* dialog variant for bigger screens

* create widgetbook; add Zeta parameter, also in ZetaButton

* useRootNavigator: false

* add iconKnob in Dialog widgetbook

* final iconData = iconKnob

---------

Co-authored-by: Luke <lwalton@zebra.com>
Co-authored-by: ahmed-osman3 <99483750+ahmed-osman3@users.noreply.github.com>
Co-authored-by: Osman <AO3856@zebra.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Luke Walton <thelukewalton@users.noreply.github.com>
Co-authored-by: Simeon Dimitrov <simeon.dimitrov.work@gmail.com>
Co-authored-by: sd-athlon <163880004+sd-athlon@users.noreply.github.com>
  • Loading branch information
8 people committed Apr 25, 2024
1 parent eefcb61 commit 6966dd9
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions example/widgetbook/pages/components/dialog_widgetbook.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'package:widgetbook/widgetbook.dart';
import 'package:zeta_flutter/zeta_flutter.dart';

import '../../test/test_components.dart';
import '../../utils/utils.dart';

Widget dialogUseCase(BuildContext context) {
final zeta = Zeta.of(context);
Expand All @@ -16,6 +17,12 @@ Widget dialogUseCase(BuildContext context) {
'Lorem ipsum dolor sit amet, conse ctetur adipiscing elit, sed do eiusm od tempor incididunt ut labore et do lore magna aliqua.',
);
final rounded = context.knobs.boolean(label: 'Rounded', initialValue: true);
final iconData = iconKnob(
context,
name: "Icon",
rounded: rounded,
initial: rounded ? Icons.warning_rounded : Icons.warning_sharp,
);
final barrierDismissible = context.knobs.boolean(label: 'Barrier dismissible', initialValue: true);
final headerAlignment = context.knobs.list<ZetaDialogHeaderAlignment>(
label: 'Header alignment',
Expand All @@ -38,7 +45,7 @@ Widget dialogUseCase(BuildContext context) {
headerAlignment: headerAlignment,
title: title,
icon: Icon(
ZetaIcons.warning_round,
iconData,
color: zeta.colors.warning,
),
message: message,
Expand All @@ -56,7 +63,7 @@ Widget dialogUseCase(BuildContext context) {
headerAlignment: headerAlignment,
title: title,
icon: Icon(
ZetaIcons.warning_round,
iconData,
color: zeta.colors.warning,
),
message: message,
Expand All @@ -75,7 +82,7 @@ Widget dialogUseCase(BuildContext context) {
headerAlignment: headerAlignment,
title: title,
icon: Icon(
ZetaIcons.warning_round,
iconData,
color: zeta.colors.warning,
),
message: message,
Expand Down

0 comments on commit 6966dd9

Please sign in to comment.