@crossed/primitive
Version:
A universal & performant styling library for React Native, Next.js & React
23 lines (22 loc) • 640 B
JavaScript
import { jsx } from "react/jsx-runtime";
import { forwardRef } from "react";
import { FocusScope } from "../utils/FocusScope";
import { useContext } from "./context";
const createSheetContent = (Styled) => forwardRef((props, ref) => {
const { id } = useContext();
return /* @__PURE__ */ jsx(FocusScope, { trapped: true, loop: true, children: /* @__PURE__ */ jsx(
Styled,
{
role: "dialog",
"aria-modal": "true",
"aria-labelledby": `${id}-title`,
"aria-describedby": `${id}-description`,
...props,
ref
}
) });
});
export {
createSheetContent
};
//# sourceMappingURL=SheetContent.js.map