gpui-component/crates
Jason Lee c98e4f0521
checkbox: Add children to Radio, Checkbox to display long texts. (#724)
This change is going to solve the wrapped text line-height.

Before this change, the Label is must set `line-height: 100%` to render
at same line with the checkbox.

But if there have a long text in label, wrapped lines need more
line-height to leave lines spaces. But if we set line-height over the
100%, that the checkbox will not align horizontal center.

So, this change to use other child to solve this issue, we can set
line-height to the child not to the label.


<img width="1204" alt="image"
src="https://github.com/user-attachments/assets/981cf925-01c7-48d7-9dd2-881c727a1759"
/>
2025-03-20 19:12:48 +08:00
..
story checkbox: Add children to Radio, Checkbox to display long texts. (#724) 2025-03-20 19:12:48 +08:00
ui checkbox: Add children to Radio, Checkbox to display long texts. (#724) 2025-03-20 19:12:48 +08:00