button: Reduce px for compact small button. (#271)
<img width="882" alt="image" src="https://github.com/user-attachments/assets/c41955ea-5126-4d1a-b2dd-dea2e4b89c9e">
This commit is contained in:
parent
2d6f478512
commit
098315ee92
2 changed files with 2 additions and 2 deletions
|
|
@ -402,7 +402,7 @@ impl Render for ButtonStory {
|
||||||
Button::new("button-xs-1", cx)
|
Button::new("button-xs-1", cx)
|
||||||
.label("Primary Button")
|
.label("Primary Button")
|
||||||
.primary()
|
.primary()
|
||||||
.small()
|
.xsmall()
|
||||||
.disabled(disabled)
|
.disabled(disabled)
|
||||||
.selected(selected)
|
.selected(selected)
|
||||||
.loading(loading)
|
.loading(loading)
|
||||||
|
|
|
||||||
|
|
@ -342,7 +342,7 @@ impl RenderOnce for Button {
|
||||||
match self.size {
|
match self.size {
|
||||||
Size::Size(size) => this.px(size * 0.2),
|
Size::Size(size) => this.px(size * 0.2),
|
||||||
Size::XSmall => this.h_5().px_1(),
|
Size::XSmall => this.h_5().px_1(),
|
||||||
Size::Small => this.h_6().px_3().when(self.compact, |this| this.px_2()),
|
Size::Small => this.h_6().px_3().when(self.compact, |this| this.px_1p5()),
|
||||||
_ => this.h_8().px_4().when(self.compact, |this| this.px_2()),
|
_ => this.h_8().px_4().when(self.compact, |this| this.px_2()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue