Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add fluid button set #15843

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
fix: button set test
  • Loading branch information
lee-chase committed Feb 28, 2024
commit ae8932aab3d20f8e29e87c5194925258ac75f076
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,9 @@ Map {
"className": Object {
"type": "string",
},
"fluid": Object {
"type": "bool",
},
"stacked": Object {
"type": "bool",
},
Expand Down
5 changes: 3 additions & 2 deletions packages/react/src/components/ButtonSet/ButtonSet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,13 @@ const ButtonSet: ForwardRefReturn<HTMLDivElement, ButtonSetProps> =
return newIsStacked;
};

/* initial value not dependant on observer */
setIsStacked(checkStacking());

if (!fluidInnerRef.current) {
return;
}

setIsStacked(checkStacking());

const resizeObserver = new ResizeObserver(() => {
setIsStacked(checkStacking());
});
Expand Down
Loading