ui: Add margin style methods to Label and LabelLike (#14032)

This PR adds margin style methods to the `Label` and `LabelLike`
components.

This allows for callers to provide a margin to these components without
needing to introduce a wrapping `div` to do so.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-07-09 17:41:54 -04:00 committed by GitHub
parent 4bb8a0845f
commit a46a562dc2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 81 additions and 50 deletions

View file

@ -2547,9 +2547,8 @@ impl CollabPanel {
.take(FACEPILE_LIMIT)
.chain(if extra_count > 0 {
Some(
div()
Label::new(format!("+{extra_count}"))
.ml_2()
.child(Label::new(format!("+{extra_count}")))
.into_any_element(),
)
} else {