@crossed/ui
Version:
A universal & performant styling library for React Native, Next.js & React
33 lines (32 loc) • 820 B
JavaScript
import { jsx } from "react/jsx-runtime";
import {
forwardRef,
memo,
useContext
} from "react";
import { localContext } from "./context";
import { Sheet } from "../Sheet";
import { Box } from "../../layout";
import { composeStyles, inlineStyle } from "@crossed/styled";
const ModalPadded = memo(
forwardRef(({ fullHeight, ...props }, ref) => {
const { showSheet } = useContext(localContext);
return showSheet ? /* @__PURE__ */ jsx(Sheet.Padded, { ref, ...props }) : /* @__PURE__ */ jsx(
Box,
{
ref,
...props,
style: composeStyles(
inlineStyle(({ space }) => ({
base: { padding: void 0, paddingHorizontal: space.xl }
})),
props.style
)
}
);
})
);
export {
ModalPadded
};
//# sourceMappingURL=Padded.js.map