Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added tabs to samples #52

Merged
merged 8 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion forui/lib/src/widgets/card/card_content.dart
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ final class FCardContentStyle with Diagnosticable {

/// Creates a [FCardContentStyle] that inherits its properties from [colorScheme] and [typography].
FCardContentStyle.inherit({required FColorScheme colorScheme, required FTypography typography})
: titleTextStyle = typography.base.copyWith(
: titleTextStyle = typography.xl2.copyWith(
fontWeight: FontWeight.w600,
color: colorScheme.foreground,
),
Expand Down
Binary file modified forui/test/golden/card/zinc-dark-raw-card-content.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified forui/test/golden/card/zinc-dark-text-card-content.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified forui/test/golden/card/zinc-light-raw-card-content.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified forui/test/golden/card/zinc-light-text-card-content.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified forui/test/golden/tabs/zinc-dark-tab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified forui/test/golden/tabs/zinc-light-tab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 15 additions & 12 deletions forui/test/src/theme/typography_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,21 @@ void main() {
typography = FTypography.inherit(colorScheme: colorScheme);

expect(typography.defaultFontFamily, 'packages/forui/Inter');
expect(typography.xs, TextStyle(color: colorScheme.foreground, fontSize: 12, height: 1));
expect(typography.sm, TextStyle(color: colorScheme.foreground, fontSize: 14, height: 1.25));
expect(typography.base, TextStyle(color: colorScheme.foreground, fontSize: 16, height: 1.5));
expect(typography.lg, TextStyle(color: colorScheme.foreground, fontSize: 18, height: 1.75));
expect(typography.xl, TextStyle(color: colorScheme.foreground, fontSize: 20, height: 1.75));
expect(typography.xl2, TextStyle(color: colorScheme.foreground, fontSize: 22, height: 2));
expect(typography.xl3, TextStyle(color: colorScheme.foreground, fontSize: 30, height: 2.25));
expect(typography.xl4, TextStyle(color: colorScheme.foreground, fontSize: 36, height: 2.5));
expect(typography.xl5, TextStyle(color: colorScheme.foreground, fontSize: 48, height: 1));
expect(typography.xl6, TextStyle(color: colorScheme.foreground, fontSize: 60, height: 1));
expect(typography.xl7, TextStyle(color: colorScheme.foreground, fontSize: 72, height: 1));
expect(typography.xl8, TextStyle(color: colorScheme.foreground, fontSize: 96, height: 1));
expect(
typography.xs,
TextStyle(
color: colorScheme.foreground, fontFamily: typography.defaultFontFamily, fontSize: 12, height: 1,));
expect(typography.sm, TextStyle(color: colorScheme.foreground, fontFamily: typography.defaultFontFamily,fontSize: 14, height: 1.25,));
expect(typography.base, TextStyle(color: colorScheme.foreground, fontFamily: typography.defaultFontFamily,fontSize: 16, height: 1.5));
expect(typography.lg, TextStyle(color: colorScheme.foreground, fontFamily: typography.defaultFontFamily, fontSize: 18, height: 1.75));
expect(typography.xl, TextStyle(color: colorScheme.foreground, fontFamily: typography.defaultFontFamily,fontSize: 20, height: 1.75));
expect(typography.xl2, TextStyle(color: colorScheme.foreground, fontFamily: typography.defaultFontFamily,fontSize: 22, height: 2));
expect(typography.xl3, TextStyle(color: colorScheme.foreground,fontFamily: typography.defaultFontFamily, fontSize: 30, height: 2.25));
expect(typography.xl4, TextStyle(color: colorScheme.foreground,fontFamily: typography.defaultFontFamily, fontSize: 36, height: 2.5));
expect(typography.xl5, TextStyle(color: colorScheme.foreground,fontFamily: typography.defaultFontFamily, fontSize: 48, height: 1));
expect(typography.xl6, TextStyle(color: colorScheme.foreground,fontFamily: typography.defaultFontFamily, fontSize: 60, height: 1));
expect(typography.xl7, TextStyle(color: colorScheme.foreground,fontFamily: typography.defaultFontFamily, fontSize: 72, height: 1));
expect(typography.xl8, TextStyle(color: colorScheme.foreground, fontFamily: typography.defaultFontFamily,fontSize: 96, height: 1));
});

test(
Expand Down
4 changes: 4 additions & 0 deletions samples/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ class _AppRouter extends $_AppRouter {
path: '/header',
page: HeaderRoute.page,
),
AutoRoute(
path: '/tabs',
page: TabsRoute.page,
),
AutoRoute(
path: '/text-field',
page: TextFieldRoute.page,
Expand Down
Loading
Loading