@yamada-ui/react
Version:
React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion
27 lines (23 loc) • 873 B
JavaScript
"use client";
import { createComponent } from "../../core/components/create-component.js";
import { flexStyle } from "./flex.style.js";
//#region src/components/flex/flex.tsx
const { PropsContext: FlexPropsContext, usePropsContext: useFlexPropsContext, withContext } = createComponent("flex", flexStyle);
/**
* `Flex` is a component that sets `flex` to `Box`. Also, convenient style shorthand is available.
*
* @see https://yamada-ui.com/docs/components/flex
*/
const Flex = withContext("div")(void 0, ({ align: alignItems, basis: flexBasis, direction: flexDirection, grow: flexGrow, justify: justifyContent, shrink: flexShrink, wrap: flexWrap,...rest }) => ({
alignItems,
flexBasis,
flexDirection,
flexGrow,
flexShrink,
flexWrap,
justifyContent,
...rest
}));
//#endregion
export { Flex, FlexPropsContext, useFlexPropsContext };
//# sourceMappingURL=flex.js.map