Initial commit
This commit is contained in:
32
node_modules/@radix-ui/react-separator/dist/index.mjs
generated
vendored
Normal file
32
node_modules/@radix-ui/react-separator/dist/index.mjs
generated
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
// packages/react/separator/src/Separator.tsx
|
||||
import * as React from "react";
|
||||
import { Primitive } from "@radix-ui/react-primitive";
|
||||
import { jsx } from "react/jsx-runtime";
|
||||
var NAME = "Separator";
|
||||
var DEFAULT_ORIENTATION = "horizontal";
|
||||
var ORIENTATIONS = ["horizontal", "vertical"];
|
||||
var Separator = React.forwardRef((props, forwardedRef) => {
|
||||
const { decorative, orientation: orientationProp = DEFAULT_ORIENTATION, ...domProps } = props;
|
||||
const orientation = isValidOrientation(orientationProp) ? orientationProp : DEFAULT_ORIENTATION;
|
||||
const ariaOrientation = orientation === "vertical" ? orientation : void 0;
|
||||
const semanticProps = decorative ? { role: "none" } : { "aria-orientation": ariaOrientation, role: "separator" };
|
||||
return /* @__PURE__ */ jsx(
|
||||
Primitive.div,
|
||||
{
|
||||
"data-orientation": orientation,
|
||||
...semanticProps,
|
||||
...domProps,
|
||||
ref: forwardedRef
|
||||
}
|
||||
);
|
||||
});
|
||||
Separator.displayName = NAME;
|
||||
function isValidOrientation(orientation) {
|
||||
return ORIENTATIONS.includes(orientation);
|
||||
}
|
||||
var Root = Separator;
|
||||
export {
|
||||
Root,
|
||||
Separator
|
||||
};
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
Reference in New Issue
Block a user