@wordpress/components
Version:
UI components for WordPress.
8 lines (7 loc) • 1.67 kB
Source Map (JSON)
{
"version": 3,
"sources": ["../../../src/item-group/item/component.tsx"],
"sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * Internal dependencies\n */\n\nimport { useItem } from './hook';\nimport { contextConnect } from '../../context';\nimport { View } from '../../view';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnconnectedItem(props, forwardedRef) {\n const {\n role,\n wrapperClassName,\n ...otherProps\n } = useItem(props);\n return /*#__PURE__*/_jsx(\"div\", {\n role: role,\n className: wrapperClassName,\n children: /*#__PURE__*/_jsx(View, {\n ...otherProps,\n ref: forwardedRef\n })\n });\n}\n\n/**\n * `Item` is used in combination with `ItemGroup` to display a list of items\n * grouped and styled together.\n *\n * ```jsx\n * import {\n * __experimentalItemGroup as ItemGroup,\n * __experimentalItem as Item,\n * } from '@wordpress/components';\n *\n * function Example() {\n * return (\n * <ItemGroup>\n * <Item>Code</Item>\n * <Item>is</Item>\n * <Item>Poetry</Item>\n * </ItemGroup>\n * );\n * }\n * ```\n */\nexport const Item = contextConnect(UnconnectedItem, 'Item');\nexport default Item;"],
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,kBAAwB;AACxB,qBAA+B;AAC/B,kBAAqB;AACrB,yBAA4B;AAC5B,SAAS,gBAAgB,OAAO,cAAc;AAC5C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,QAAI,qBAAQ,KAAK;AACjB,SAAoB,uCAAAA,KAAK,OAAO;AAAA,IAC9B;AAAA,IACA,WAAW;AAAA,IACX,UAAuB,uCAAAA,KAAK,kBAAM;AAAA,MAChC,GAAG;AAAA,MACH,KAAK;AAAA,IACP,CAAC;AAAA,EACH,CAAC;AACH;AAuBO,IAAM,WAAO,+BAAe,iBAAiB,MAAM;AAC1D,IAAO,oBAAQ;",
"names": ["_jsx"]
}