@wordpress/components
Version:
UI components for WordPress.
8 lines (7 loc) • 1.37 kB
Source Map (JSON)
{
"version": 3,
"sources": ["../../src/surface/component.tsx"],
"sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * Internal dependencies\n */\nimport { contextConnect } from '../context';\nimport { View } from '../view';\nimport { useSurface } from './hook';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnconnectedSurface(props, forwardedRef) {\n const surfaceProps = useSurface(props);\n return /*#__PURE__*/_jsx(View, {\n ...surfaceProps,\n ref: forwardedRef\n });\n}\n\n/**\n * `Surface` is a core component that renders a primary background color.\n *\n * In the example below, notice how the `Surface` renders in white (or dark gray if in dark mode).\n *\n * ```jsx\n * import {\n *\t__experimentalSurface as Surface,\n *\t__experimentalText as Text,\n * } from '@wordpress/components';\n *\n * function Example() {\n * \treturn (\n * \t\t<Surface>\n * \t\t\t<Text>Code is Poetry</Text>\n * \t\t</Surface>\n * \t);\n * }\n * ```\n */\nexport const Surface = contextConnect(UnconnectedSurface, 'Surface');\nexport default Surface;"],
"mappings": ";AAOA,SAAS,sBAAsB;AAC/B,SAAS,YAAY;AACrB,SAAS,kBAAkB;AAC3B,SAAS,OAAO,YAAY;AAC5B,SAAS,mBAAmB,OAAO,cAAc;AAC/C,QAAM,eAAe,WAAW,KAAK;AACrC,SAAoB,qBAAK,MAAM;AAAA,IAC7B,GAAG;AAAA,IACH,KAAK;AAAA,EACP,CAAC;AACH;AAsBO,IAAM,UAAU,eAAe,oBAAoB,SAAS;AACnE,IAAO,oBAAQ;",
"names": []
}