UNPKG

@wordpress/components

Version:
1 lines • 829 B
{"version":3,"file":"hook.mjs","names":[],"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,eACA,iBAAkB,OAAO,QAAS;CAStC,OAPoB,UAAW;EAC9B,WAAW;EACX;EACA;EACA,GAAG;CACJ,CAEiB;AAClB"}