@wordpress/components
Version:
UI components for WordPress.
1 lines • 1.7 kB
Source Map (JSON)
{"version":3,"file":"deprecated.mjs","names":[],"sources":["../../src/divider/deprecated.tsx"],"sourcesContent":["import type { ForwardedRef } from 'react';\nimport deprecated from '@wordpress/deprecated';\nimport type { WordPressComponentProps } from '../context';\nimport { contextConnect } from '../context';\nimport { UnconnectedDivider } from './component';\nimport type { DividerProps } from './types';\n\nfunction UnconnectedDeprecatedDivider(\n\tprops: WordPressComponentProps< DividerProps, 'hr', false >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tdeprecated( 'wp.components.__experimentalDivider', {\n\t\tsince: '7.2',\n\t\tversion: '7.4',\n\t} );\n\n\t// Nested <Divider /> would contextConnect twice.\n\treturn UnconnectedDivider( props, forwardedRef );\n}\n\n/**\n * `Divider` is a layout component that separates groups of related content.\n *\n * This component is deprecated. Prefer a `Separator` subcomponent such as\n * `Menu.Separator` when the surrounding component provides one. Otherwise\n * write your own CSS, preferably using the [design tokens](https://wordpress.github.io/gutenberg/?path=/docs/design-system-tokens-introduction--docs)\n * available in `@wordpress/theme`.\n *\n * @deprecated\n *\n * ```jsx\n * import { __experimentalDivider as Divider } from '@wordpress/components';\n *\n * function Example() {\n * \treturn <Divider />;\n * }\n * ```\n */\nconst DeprecatedDivider = contextConnect(\n\tUnconnectedDeprecatedDivider,\n\t'Divider'\n);\n\nexport default DeprecatedDivider;\n"],"mappings":";;;;AAOA,SAAS,6BACR,OACA,cACC;CACD,WAAY,uCAAuC;EAClD,OAAO;EACP,SAAS;CACV,CAAE;CAGF,OAAO,mBAAoB,OAAO,YAAa;AAChD;;;;;;;;;;;;;;;;;;;AAoBA,MAAM,oBAAoB,eACzB,8BACA,SACD"}