Skip to content

Commit

Permalink
theme
Browse files Browse the repository at this point in the history
  • Loading branch information
tilucasoli committed Dec 18, 2024
1 parent 692d010 commit 61f9e8b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/remix/lib/src/themes/fortaleza/components.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import '../../components/dropdown_menu/dropdown_menu.dart';
import '../../core/theme/component.dart';
import 'components/accordion_theme.dart';
import 'components/avatar_theme.dart';
Expand All @@ -10,6 +9,7 @@ import 'components/checkbox_theme.dart';
import 'components/chip_theme.dart';
import 'components/dialog_theme.dart';
import 'components/divider_theme.dart';
import 'components/dropdown.dart';
import 'components/icon_button_theme.dart';
import 'components/menu_item_theme.dart';
import 'components/progress_theme.dart';
Expand Down Expand Up @@ -74,7 +74,7 @@ class FortalezaComponentTheme extends RemixComponentTheme {
textField: FortalezaTextFieldStyle(),
toast: FortalezaToastStyle(),
slider: FortalezaSliderStyle(),
dropdownMenu: DropdownMenuStyle(),
dropdownMenu: FortalezaDropdownMenuStyle(),
);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import 'package:mix/mix.dart';

import '../../../components/dropdown_menu/dropdown_menu.dart';
import '../tokens.dart';

class FortalezaDropdownMenuStyle extends DropdownMenuStyle {
const FortalezaDropdownMenuStyle();

@override
Style makeStyle(SpecConfiguration<DropdownMenuSpecUtility> spec) {
final $ = spec.utilities;

final baseStyle = super.makeStyle(spec);

final baseThemeOverrides = Style(
$.menu.container.chain
..color.$neutral(1)
..border.all.color.$neutral(6)
..wrap.intrinsicWidth()
..padding.all.$space2(),
$.item.container.padding.horizontal.$space3(),
$.item.text.style.color.$neutral(12),
spec.on.hover($.item.container.color.$neutral(4)),
);

return Style.create([baseStyle(), baseThemeOverrides()])
.animate(duration: const Duration(milliseconds: 100));
}
}

0 comments on commit 61f9e8b

Please sign in to comment.