Skip to content

Commit ff3411a

Browse files
committed
upd
1 parent 72aaca7 commit ff3411a

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

optimus/lib/src/date_time_field.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class _OptimusDateTimeFieldState extends State<OptimusDateTimeField>
100100
onTap: _handleTap,
101101
child: Icon(
102102
OptimusIcons.calendar,
103-
size: tokens.fontSize300,
103+
size: tokens.sizing300,
104104
color: _iconColor,
105105
),
106106
),

optimus/lib/src/icon.dart

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ class OptimusSupplementaryIcon extends StatelessWidget {
108108

109109
@override
110110
Widget build(BuildContext context) {
111-
final theme = OptimusTheme.of(context);
111+
final theme = context.theme;
112+
final tokens = context.tokens;
112113

113114
return Container(
114115
width: _diameter,
@@ -120,16 +121,17 @@ class OptimusSupplementaryIcon extends StatelessWidget {
120121
child: Icon(
121122
iconData,
122123
color: colorOption.toSupplementaryIconColor(theme),
123-
size: context.tokens.sizing400,
124+
size: tokens.sizing400,
124125
),
125126
);
126127
}
127128
}
128129

129130
extension on OptimusIconColorOption {
130131
Color toIconColor(OptimusThemeData theme) => switch (this) {
131-
OptimusIconColorOption.basic =>
132-
theme.isDark ? theme.colors.neutral0 : theme.colors.neutral500,
132+
OptimusIconColorOption.basic => theme.isDark
133+
? theme.colors.neutral0
134+
: theme.colors.neutral500, // TODO(witwash): to tokenss
133135
OptimusIconColorOption.primary => theme.colors.primary500,
134136
OptimusIconColorOption.success => theme.colors.success500,
135137
OptimusIconColorOption.info => theme.colors.info500,

0 commit comments

Comments
 (0)