ui: Apply elevation outside SettingsContainer
(#15346)
This PR changes the `SettingsContainer` component such that the elevation styles are applied by the parent instead of `SettingsContainer` itself. This means that components using `SettingsContainer` can be embedded in different contexts, like the settings UI or a popover containing the settings. Release Notes: - N/A
This commit is contained in:
parent
b05d532991
commit
cb07e02ce9
2 changed files with 13 additions and 15 deletions
|
@ -23,11 +23,7 @@ impl ParentElement for SettingsContainer {
|
|||
}
|
||||
|
||||
impl RenderOnce for SettingsContainer {
|
||||
fn render(self, cx: &mut WindowContext) -> impl IntoElement {
|
||||
v_flex()
|
||||
.elevation_2(cx)
|
||||
.px_2()
|
||||
.gap_1()
|
||||
.children(self.children)
|
||||
fn render(self, _cx: &mut WindowContext) -> impl IntoElement {
|
||||
v_flex().px_2().gap_1().children(self.children)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue