Skip to content

Commit 3c0a040

Browse files
authored
refactor: Add more components to support CosmosTheme (#271)
1 parent aa8d53f commit 3c0a040

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

packages/cosmos_ui_components/lib/components/cosmos_bottom_sheet_header.dart

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import 'package:cosmos_ui_components/cosmos_text_theme.dart';
12
import 'package:cosmos_ui_components/cosmos_theme.dart';
23
import 'package:flutter/foundation.dart';
34
import 'package:flutter/material.dart';
@@ -49,7 +50,13 @@ class CosmosBottomSheetHeader extends StatelessWidget {
4950
child: Row(
5051
children: [
5152
SizedBox(width: theme.spacingM),
52-
Text(title, style: titleTextStyle),
53+
Text(
54+
title,
55+
style: titleTextStyle ??
56+
CosmosTextTheme.title2Bold.copyWith(
57+
color: theme.colors.text,
58+
),
59+
),
5360
SizedBox(width: theme.spacingM),
5461
],
5562
),

packages/cosmos_ui_components/lib/components/cosmos_checkbox_tile.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class CosmosCheckboxTile extends StatelessWidget {
5252
Expanded(
5353
child: Text(
5454
text,
55-
style: CosmosTextTheme.copyMinus1Normal,
55+
style: CosmosTextTheme.copyMinus1Normal.copyWith(color: theme.colors.text),
5656
),
5757
),
5858
],

packages/cosmos_ui_components/lib/components/cosmos_circle_text_button.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import 'package:cosmos_ui_components/cosmos_text_theme.dart';
12
import 'package:cosmos_ui_components/cosmos_theme.dart';
23
import 'package:flutter/foundation.dart';
34
import 'package:flutter/material.dart';
@@ -38,7 +39,9 @@ class CosmosCircleTextButton extends StatelessWidget {
3839
SizedBox(width: theme.spacingL),
3940
Text(
4041
text,
41-
style: isEnabled ? null : TextStyle(color: theme.colors.inactive),
42+
style: CosmosTextTheme.copy0Normal.copyWith(
43+
color: isEnabled ? theme.colors.text : theme.colors.inactive,
44+
),
4245
),
4346
],
4447
),

packages/cosmos_ui_components/lib/components/cosmos_text_button.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class CosmosTextButton extends StatelessWidget {
3939
style: TextButton.styleFrom(
4040
fixedSize: Size.fromHeight(height),
4141
shape: RoundedRectangleBorder(borderRadius: theme.borderRadiusM),
42-
onSurface: color,
42+
onSurface: color ?? theme.colors.text,
4343
),
4444
child: Row(
4545
mainAxisSize: MainAxisSize.min,

0 commit comments

Comments
 (0)