-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
692d010
commit 61f9e8b
Showing
2 changed files
with
31 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
packages/remix/lib/src/themes/fortaleza/components/dropdown_theme.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)); | ||
} | ||
} |