Skip to content

Commit

Permalink
feat: Move shadow of Input to InputTheme (#781)
Browse files Browse the repository at this point in the history
  • Loading branch information
marc2332 authored Jul 11, 2024
1 parent 63c6057 commit dc37387
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/components/src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ pub fn Input(
corner_radius,
font_theme,
placeholder_font_theme,
shadow,
..
} = theme;

Expand All @@ -203,7 +204,7 @@ pub fn Input(
color: "{color}",
background: "{background}",
border: "1 solid {border_fill}",
shadow: "0 4 5 0 rgb(0, 0, 0, 0.1)",
shadow: "{shadow}",
corner_radius: "{corner_radius}",
margin: "{margin}",
cursor_reference,
Expand Down
1 change: 1 addition & 0 deletions crates/hooks/src/theming/dark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ pub const DARK_THEME: Theme = Theme {
width: LIGHT_THEME.input.width,
margin: LIGHT_THEME.input.margin,
corner_radius: LIGHT_THEME.input.corner_radius,
shadow: LIGHT_THEME.input.shadow,
},
switch: SwitchTheme {
background: cow_borrowed!("rgb(60, 60, 60)"),
Expand Down
1 change: 1 addition & 0 deletions crates/hooks/src/theming/light.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ pub const LIGHT_THEME: Theme = Theme {
width: cow_borrowed!("150"),
margin: cow_borrowed!("4"),
corner_radius: cow_borrowed!("10"),
shadow: cow_borrowed!("0 4 5 0 rgb(0, 0, 0, 0.1)"),
},
switch: SwitchTheme {
background: cow_borrowed!("rgb(121, 116, 126)"),
Expand Down
1 change: 1 addition & 0 deletions crates/hooks/src/theming/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ define_theme! {
background: str,
hover_background: str,
border_fill: str,
shadow: str,
width: str,
margin: str,
corner_radius: str,
Expand Down

0 comments on commit dc37387

Please sign in to comment.