Skip to content

Commit dc37387

Browse files
authored
feat: Move shadow of Input to InputTheme (#781)
1 parent 63c6057 commit dc37387

File tree

4 files changed

+5
-1
lines changed

4 files changed

+5
-1
lines changed

crates/components/src/input.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ pub fn Input(
181181
corner_radius,
182182
font_theme,
183183
placeholder_font_theme,
184+
shadow,
184185
..
185186
} = theme;
186187

@@ -203,7 +204,7 @@ pub fn Input(
203204
color: "{color}",
204205
background: "{background}",
205206
border: "1 solid {border_fill}",
206-
shadow: "0 4 5 0 rgb(0, 0, 0, 0.1)",
207+
shadow: "{shadow}",
207208
corner_radius: "{corner_radius}",
208209
margin: "{margin}",
209210
cursor_reference,

crates/hooks/src/theming/dark.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ pub const DARK_THEME: Theme = Theme {
4444
width: LIGHT_THEME.input.width,
4545
margin: LIGHT_THEME.input.margin,
4646
corner_radius: LIGHT_THEME.input.corner_radius,
47+
shadow: LIGHT_THEME.input.shadow,
4748
},
4849
switch: SwitchTheme {
4950
background: cow_borrowed!("rgb(60, 60, 60)"),

crates/hooks/src/theming/light.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ pub const LIGHT_THEME: Theme = Theme {
4444
width: cow_borrowed!("150"),
4545
margin: cow_borrowed!("4"),
4646
corner_radius: cow_borrowed!("10"),
47+
shadow: cow_borrowed!("0 4 5 0 rgb(0, 0, 0, 0.1)"),
4748
},
4849
switch: SwitchTheme {
4950
background: cow_borrowed!("rgb(121, 116, 126)"),

crates/hooks/src/theming/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ define_theme! {
272272
background: str,
273273
hover_background: str,
274274
border_fill: str,
275+
shadow: str,
275276
width: str,
276277
margin: str,
277278
corner_radius: str,

0 commit comments

Comments
 (0)