mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-10-30 16:47:54 +09:00
Ref https://github.com/webstudio-is/webstudio-builder/issues/1129 Splitted base components into separate package. Exposed 3 entry points - @webstudio-is/sdk-components-react - @webstudio-is/sdk-components-react/metas - @webstudio-is/sdk-components-react/props
19 lines
378 B
TypeScript
19 lines
378 B
TypeScript
import {
|
|
forwardRef,
|
|
createElement,
|
|
type ElementRef,
|
|
type ComponentProps,
|
|
} from "react";
|
|
|
|
export const defaultTag = "hr";
|
|
|
|
type Props = ComponentProps<typeof defaultTag>;
|
|
|
|
export const Separator = forwardRef<ElementRef<typeof defaultTag>, Props>(
|
|
(props, ref) => {
|
|
return createElement(defaultTag, { ...props, ref });
|
|
}
|
|
);
|
|
|
|
Separator.displayName = "Separator";
|