@wordpress/components
Version:
UI components for WordPress.
8 lines (7 loc) • 1.46 kB
Source Map (JSON)
{
"version": 3,
"sources": ["../../src/elevation/component.tsx"],
"sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * Internal dependencies\n */\n\nimport { contextConnect } from '../context';\nimport { View } from '../view';\nimport { useElevation } from './hook';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnconnectedElevation(props, forwardedRef) {\n const elevationProps = useElevation(props);\n return /*#__PURE__*/_jsx(View, {\n ...elevationProps,\n ref: forwardedRef\n });\n}\n\n/**\n * `Elevation` is a core component that renders shadow, using the component\n * system's shadow system.\n *\n * The shadow effect is generated using the `value` prop.\n *\n * ```jsx\n * import {\n *\t__experimentalElevation as Elevation,\n *\t__experimentalSurface as Surface,\n *\t__experimentalText as Text,\n * } from '@wordpress/components';\n *\n * function Example() {\n * return (\n * <Surface>\n * <Text>Code is Poetry</Text>\n * <Elevation value={ 5 } />\n * </Surface>\n * );\n * }\n * ```\n */\nexport const Elevation = contextConnect(UnconnectedElevation, 'Elevation');\nexport default Elevation;"],
"mappings": ";AAQA,SAAS,sBAAsB;AAC/B,SAAS,YAAY;AACrB,SAAS,oBAAoB;AAC7B,SAAS,OAAO,YAAY;AAC5B,SAAS,qBAAqB,OAAO,cAAc;AACjD,QAAM,iBAAiB,aAAa,KAAK;AACzC,SAAoB,qBAAK,MAAM;AAAA,IAC7B,GAAG;AAAA,IACH,KAAK;AAAA,EACP,CAAC;AACH;AAyBO,IAAM,YAAY,eAAe,sBAAsB,WAAW;AACzE,IAAO,oBAAQ;",
"names": []
}