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:
Marshall Bowers 2024-07-27 14:00:03 -04:00 committed by GitHub
parent b05d532991
commit cb07e02ce9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 15 deletions

View file

@ -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)
}
}