UNPKG

@wordpress/components

Version:
1 lines • 903 B
{"version":3,"file":"hook.cjs","names":["useContextSystem","useHStack"],"sources":["../../src/v-stack/hook.ts"],"sourcesContent":["import type { WordPressComponentProps } from '../context';\nimport { useContextSystem } from '../context';\nimport { useHStack } from '../h-stack';\nimport type { VStackProps } from './types';\n\nexport function useVStack(\n\tprops: WordPressComponentProps< VStackProps, 'div' >\n) {\n\tconst {\n\t\texpanded = false,\n\t\talignment = 'stretch',\n\t\t...otherProps\n\t} = useContextSystem( props, 'VStack' );\n\n\tconst hStackProps = useHStack( {\n\t\tdirection: 'column',\n\t\texpanded,\n\t\talignment,\n\t\t...otherProps,\n\t} );\n\n\treturn hStackProps;\n}\n"],"mappings":";;;;;;;;AAKA,SAAgB,UACf,OACC;CACD,MAAM,EACL,WAAW,OACX,YAAY,WACZ,GAAG,gBAAA,GACAA,oBAAAA,iBAAAA,CAAkB,OAAO,QAAS;CAStC,QAAA,GAPoBC,oBAAAA,UAAAA,CAAW;EAC9B,WAAW;EACX;EACA;EACA,GAAG;CACJ,CAEiB;AAClB"}