@chakra-ui/react
Version:
Responsive and accessible React UI components built with React and Emotion
38 lines (34 loc) • 729 B
JavaScript
"use client";
;
var factory = require('../../styled-system/factory.cjs');
const AbsoluteCenter = factory.chakra("div", {
base: {
position: "absolute",
display: "flex",
alignItems: "center",
justifyContent: "center"
},
variants: {
axis: {
horizontal: {
insetStart: "50%",
transform: "translateX(-50%)"
},
vertical: {
top: "50%",
transform: "translateY(-50%)"
},
both: {
insetStart: "50%",
top: "50%",
transform: "translate(-50%, -50%)"
}
}
},
defaultVariants: {
axis: "both"
}
});
AbsoluteCenter.displayName = "AbsoluteCenter";
exports.AbsoluteCenter = AbsoluteCenter;
;