diff --git a/example/lib/pages/components/date_input_example.dart b/example/lib/pages/components/date_input_example.dart index 2f8c9470..83ac0812 100644 --- a/example/lib/pages/components/date_input_example.dart +++ b/example/lib/pages/components/date_input_example.dart @@ -23,7 +23,7 @@ class _DateInputExampleState extends State { children: [ Padding( padding: const EdgeInsets.only(top: 20), - child: Text('Rounded', style: ZetaTextStyles.titleSmall), + child: Text('Rounded', style: ZetaTextStyles.titleMedium), ), Padding( padding: const EdgeInsets.all(20), @@ -46,7 +46,7 @@ class _DateInputExampleState extends State { Divider(color: Colors.grey[200]), Padding( padding: const EdgeInsets.only(top: 20), - child: Text('Sharp', style: ZetaTextStyles.titleSmall), + child: Text('Sharp', style: ZetaTextStyles.titleMedium), ), Padding( padding: const EdgeInsets.all(20), @@ -61,7 +61,7 @@ class _DateInputExampleState extends State { Divider(color: Colors.grey[200]), Padding( padding: const EdgeInsets.only(top: 20), - child: Text('Disabled', style: ZetaTextStyles.titleSmall), + child: Text('Disabled', style: ZetaTextStyles.titleMedium), ), Padding( padding: const EdgeInsets.all(20), @@ -74,7 +74,7 @@ class _DateInputExampleState extends State { Divider(color: Colors.grey[200]), Padding( padding: const EdgeInsets.only(top: 20), - child: Text('Medium', style: ZetaTextStyles.titleSmall), + child: Text('Medium', style: ZetaTextStyles.titleMedium), ), Padding( padding: const EdgeInsets.all(20), @@ -88,7 +88,7 @@ class _DateInputExampleState extends State { Divider(color: Colors.grey[200]), Padding( padding: const EdgeInsets.only(top: 20), - child: Text('Small', style: ZetaTextStyles.titleSmall), + child: Text('Small', style: ZetaTextStyles.titleMedium), ), Padding( padding: const EdgeInsets.all(20), diff --git a/lib/src/components/date_input/date_input.dart b/lib/src/components/date_input/date_input.dart index 1de3d6f6..83c07811 100644 --- a/lib/src/components/date_input/date_input.dart +++ b/lib/src/components/date_input/date_input.dart @@ -186,8 +186,7 @@ class _ZetaDateInputState extends State { padding: const EdgeInsets.only(bottom: 5), child: Text( widget.label!, - style: ZetaTextStyles.bodyLarge.copyWith( - height: 1.33, + style: ZetaTextStyles.bodyMedium.copyWith( color: widget.enabled ? zeta.colors.textDefault : zeta.colors.cool.shade50, ), ), @@ -198,7 +197,7 @@ class _ZetaDateInputState extends State { inputFormatters: [_dateFormatter], keyboardType: TextInputType.number, onChanged: (_) => _onChanged(), - style: ZetaTextStyles.bodyLarge.copyWith(height: 1.5), + style: _size == ZetaDateInputSize.small ? ZetaTextStyles.bodyXSmall : ZetaTextStyles.bodyMedium, decoration: InputDecoration( isDense: true, contentPadding: EdgeInsets.symmetric( @@ -236,10 +235,13 @@ class _ZetaDateInputState extends State { minHeight: ZetaSpacing.m, minWidth: ZetaSpacing.m, ), - hintStyle: ZetaTextStyles.bodyLarge.copyWith( - color: widget.enabled ? zeta.colors.textDefault : zeta.colors.cool.shade50, - height: 1.5, - ), + hintStyle: _size == ZetaDateInputSize.small + ? ZetaTextStyles.bodyXSmall.copyWith( + color: widget.enabled ? zeta.colors.textDefault : zeta.colors.cool.shade50, + ) + : ZetaTextStyles.bodyMedium.copyWith( + color: widget.enabled ? zeta.colors.textDefault : zeta.colors.cool.shade50, + ), filled: !widget.enabled || hasError ? true : null, fillColor: widget.enabled ? hasError @@ -275,7 +277,7 @@ class _ZetaDateInputState extends State { Expanded( child: Text( showError && widget.enabled ? widget.errorText! : widget.hint!, - style: ZetaTextStyles.bodySmall.copyWith( + style: ZetaTextStyles.bodyXSmall.copyWith( color: hintErrorColor, ), ), @@ -290,7 +292,7 @@ class _ZetaDateInputState extends State { double _inputVerticalPadding(ZetaDateInputSize size) => switch (size) { ZetaDateInputSize.large => ZetaSpacing.x3, ZetaDateInputSize.medium => ZetaSpacing.x2, - ZetaDateInputSize.small => ZetaSpacing.x1, + ZetaDateInputSize.small => ZetaSpacing.x2, }; double _iconSize(ZetaDateInputSize size) => switch (size) {