import * as React from "react";
import { useStyletron } from "baseui";
import { LabelSmall } from "baseui/typography";
import { StatefulCheckbox } from "baseui/checkbox";
import { StatefulPopover, PLACEMENT, TRIGGER_TYPE } from "baseui/popover";
const CheckboxWithRef = React.forwardRef((props: any, ref) => {
const { children, ...restProps } = props;
return (
{children}
);
});
export default function Example() {
const [css] = useStyletron();
return (
This is a popover example
}
accessibilityType={"tooltip"}
>
Created a wrapper component that renders Checkbox and passes popover's
anchor props to the Checkbox's Root element.
This is a popover example
}
accessibilityType={"tooltip"}
>
Wrapped checkbox with props passed to the wrapper.
);
}