UNPKG

@wordpress/components

Version:
33 lines (32 loc) • 1.15 kB
import deprecated from "@wordpress/deprecated"; import { contextConnect } from "../context/index.mjs"; import { UnconnectedDivider } from "./component.mjs"; // packages/components/src/divider/deprecated.tsx function UnconnectedDeprecatedDivider(props, forwardedRef) { deprecated("wp.components.__experimentalDivider", { since: "7.2", version: "7.4" }); return UnconnectedDivider(props, forwardedRef); } /** * `Divider` is a layout component that separates groups of related content. * * This component is deprecated. Prefer a `Separator` subcomponent such as * `Menu.Separator` when the surrounding component provides one. Otherwise * write your own CSS, preferably using the [design tokens](https://wordpress.github.io/gutenberg/?path=/docs/design-system-tokens-introduction--docs) * available in `@wordpress/theme`. * * @deprecated * * ```jsx * import { __experimentalDivider as Divider } from '@wordpress/components'; * * function Example() { * return <Divider />; * } * ``` */ const DeprecatedDivider = contextConnect(UnconnectedDeprecatedDivider, "Divider"); export { DeprecatedDivider as default }; //# sourceMappingURL=deprecated.mjs.map