You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BBButton: add a full-width option and forward className #98
Is your feature request related to a problem? Please describe. BBButton sizes itself to its label (display: inline-flex), and a consumer can't change that:
It has no width prop.
It doesn't forward className or style to the <button>, so styled(BBButton) has no effect.
The label never wraps (white-space: nowrap), so a long translation overflows a fixed-width button instead of breaking onto two lines.
So a consumer that needs a button to fill a footer, a popover or a dialog row has to wrap it in a div and reach into it with a child selector. The BigBlueButton client now keeps a shared module of these wrappers (common/button-wrapper/styles.ts). The poll, timer and breakout panels use it, and more call sites are coming as other screens move to BBButton:
The wrappers depend on BBButton's DOM shape. A > * selector reaches the <button> only because it is the root element. In the stacked layout the root is a wrapper div, so the same rule sizes the wrong element.
Describe the solution you'd like
A fullWidth?: boolean prop: the button fills its container, with the label still centered.
Forward className (and ideally style) to the root element, so one-off layout needs work through styled(BBButton). Examples are a minimum width for short labels ("Pin", "Yes"), margins, or letting the label wrap.
Describe alternatives you've considered
Wrapper divs with child selectors, which is what the client does today. They work, but every consumer has to know the component's markup.
Additional context
A minimum width for short labels is probably the consumer's choice rather than a library default. Forwarding className is enough for that.
Activity