@wordpress/components
Version:
UI components for WordPress.
1 lines • 1.59 kB
Source Map (JSON)
{"version":3,"file":"deprecated.mjs","names":[],"sources":["../../src/scrollable/deprecated.tsx"],"sourcesContent":["import type { ForwardedRef } from 'react';\nimport deprecated from '@wordpress/deprecated';\nimport type { WordPressComponentProps } from '../context';\nimport { contextConnect } from '../context';\nimport { UnconnectedScrollable } from './component';\nimport type { ScrollableProps } from './types';\n\nfunction UnconnectedDeprecatedScrollable(\n\tprops: WordPressComponentProps< ScrollableProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tdeprecated( 'wp.components.__experimentalScrollable', {\n\t\tsince: '7.2',\n\t\tversion: '7.4',\n\t} );\n\n\t// Nested <Scrollable /> would contextConnect twice.\n\treturn UnconnectedScrollable( props, forwardedRef );\n}\n\n/**\n * `Scrollable` is a layout component that puts content in a scrollable\n * container.\n *\n * This component is deprecated. Write your own CSS instead.\n *\n * @deprecated\n *\n * ```jsx\n * import { __experimentalScrollable as Scrollable } from '@wordpress/components';\n *\n * function Example() {\n * \treturn (\n * \t\t<Scrollable style={ { maxHeight: 200 } }>\n * \t\t\t<div style={ { height: 500 } }>...</div>\n * \t\t</Scrollable>\n * \t);\n * }\n * ```\n */\nconst DeprecatedScrollable = contextConnect(\n\tUnconnectedDeprecatedScrollable,\n\t'Scrollable'\n);\n\nexport default DeprecatedScrollable;\n"],"mappings":";;;;AAOA,SAAS,gCACR,OACA,cACC;CACD,WAAY,0CAA0C;EACrD,OAAO;EACP,SAAS;CACV,CAAE;CAGF,OAAO,sBAAuB,OAAO,YAAa;AACnD;;;;;;;;;;;;;;;;;;;;;AAsBA,MAAM,uBAAuB,eAC5B,iCACA,YACD"}