@wordpress/components
Version:
UI components for WordPress.
1 lines • 1.1 kB
Source Map (JSON)
{"version":3,"file":"component.cjs","names":["useNavigatorButton","View","contextConnect"],"sources":["../../../src/navigator/navigator-button/component.tsx"],"sourcesContent":["import type { ForwardedRef } from 'react';\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect } from '../../context';\nimport { View } from '../../view';\nimport { useNavigatorButton } from './hook';\nimport type { NavigatorButtonProps } from '../types';\n\nfunction UnconnectedNavigatorButton(\n\tprops: WordPressComponentProps< NavigatorButtonProps, 'button' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst navigatorButtonProps = useNavigatorButton( props );\n\n\treturn <View ref={ forwardedRef } { ...navigatorButtonProps } />;\n}\n\nexport const NavigatorButton = contextConnect(\n\tUnconnectedNavigatorButton,\n\t'Navigator.Button'\n);\n"],"mappings":";;;;;;;;;;AAOA,SAAS,2BACR,OACA,cACC;CACD,MAAM,wBAAA,GAAuBA,UAAAA,mBAAAA,CAAoB,KAAM;CAEvD,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACC,oBAAAA,MAAD;EAAM,KAAM;EAAe,GAAK;CAAwB,CAAA;AAChE;AAEA,MAAa,mBAAA,GAAkBC,uBAAAA,eAAAA,CAC9B,4BACA,kBACD"}