We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8302a46 commit 621ec8eCopy full SHA for 621ec8e
1 file changed
src/lib/components/layout/Flex.tsx
@@ -17,6 +17,7 @@ import yoga from 'yoga-layout-prebuilt';
17
import type { Flex as FlexElement } from '../../renderer/inSim';
18
import type { ButtonProps } from '../Button';
19
import { Button } from '../Button';
20
+import { ToggleButton } from '../ui';
21
22
export type FlexProps = PositionProps &
23
Partial<
@@ -272,7 +273,8 @@ export const Flex = forwardRef(function FlexWithRef(
272
273
});
274
275
const isValidChild = (child: ReactElement | null): child is ReactElement =>
- child !== null && (child.type === Button || child.type === Flex);
276
+ child !== null &&
277
+ (child.type === Button || child.type === ToggleButton || child.type === Flex);
278
279
const directionMap: Record<
280
NonNullable<FlexProps['direction']>,
0 commit comments