@wordpress/components
Version:
UI components for WordPress.
39 lines (38 loc) • 726 B
JavaScript
/**
* Internal dependencies
*/
import { createComponent } from '../utils';
import { useHStack } from './hook';
/**
* `HStack` (Horizontal Stack) arranges child elements in a horizontal line.
*
* `HStack` can render anything inside.
*
* @example
* ```jsx
* import { HStack, Text, View } from `@wordpress/components/ui`;
*
* function Example() {
* return (
* <HStack>
* <View>
* <Text>Code</Text>
* </View>
* <View>
* <Text>is</Text>
* </View>
* <View>
* <Text>Poetry</Text>
* </View>
* </HStack>
* );
* }
* ```
*/
const HStack = createComponent({
as: 'div',
useHook: useHStack,
name: 'HStack'
});
export default HStack;
//# sourceMappingURL=component.js.map