File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ class _OptimusDateTimeFieldState extends State<OptimusDateTimeField>
100
100
onTap: _handleTap,
101
101
child: Icon (
102
102
OptimusIcons .calendar,
103
- size: tokens.fontSize300 ,
103
+ size: tokens.sizing300 ,
104
104
color: _iconColor,
105
105
),
106
106
),
Original file line number Diff line number Diff line change @@ -108,7 +108,8 @@ class OptimusSupplementaryIcon extends StatelessWidget {
108
108
109
109
@override
110
110
Widget build (BuildContext context) {
111
- final theme = OptimusTheme .of (context);
111
+ final theme = context.theme;
112
+ final tokens = context.tokens;
112
113
113
114
return Container (
114
115
width: _diameter,
@@ -120,16 +121,17 @@ class OptimusSupplementaryIcon extends StatelessWidget {
120
121
child: Icon (
121
122
iconData,
122
123
color: colorOption.toSupplementaryIconColor (theme),
123
- size: context. tokens.sizing400,
124
+ size: tokens.sizing400,
124
125
),
125
126
);
126
127
}
127
128
}
128
129
129
130
extension on OptimusIconColorOption {
130
131
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
133
135
OptimusIconColorOption .primary => theme.colors.primary500,
134
136
OptimusIconColorOption .success => theme.colors.success500,
135
137
OptimusIconColorOption .info => theme.colors.info500,
You can’t perform that action at this time.
0 commit comments