UNPKG

@wordpress/components

Version:
44 lines (43 loc) • 1.18 kB
"use strict"; Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } }); let ___context_index_ts = require("../context/index.cjs"); let ___view_index_ts = require("../view/index.cjs"); let __hook_tsx = require("./hook.cjs"); let react_jsx_runtime = require("react/jsx-runtime"); // packages/components/src/h-stack/component.tsx function UnconnectedHStack(props, forwardedRef) { const hStackProps = (0, __hook_tsx.useHStack)(props); return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(___view_index_ts.View, { ...hStackProps, ref: forwardedRef }); } /** * `HStack` (Horizontal Stack) arranges child elements in a horizontal line. * * `HStack` can render anything inside. * * ```jsx * import { * __experimentalHStack as HStack, * __experimentalText as Text, * } from `@wordpress/components`; * * function Example() { * return ( * <HStack> * <Text>Code</Text> * <Text>is</Text> * <Text>Poetry</Text> * </HStack> * ); * } * ``` */ const HStack = (0, ___context_index_ts.contextConnect)(UnconnectedHStack, "HStack"); exports.HStack = HStack; exports.default = HStack; //# sourceMappingURL=component.cjs.map