UNPKG

@fidely-ui/react

Version:

Fidely UI is a modern, beautifully crafted React design system powered by Ark UI and Panda CSS, delivering accessible and themeable components for building exceptional web apps

27 lines (26 loc) 770 B
'use client'; import { jsx as _jsx } from "react/jsx-runtime"; import { forwardRef } from 'react'; import { styled } from '@fidely-ui/styled-system/jsx'; import { flex } from '@fidely-ui/styled-system/patterns'; import { splitProps } from '../../utils/split-props'; /** * Flex component * * Provides a flexible box layout system using Panda's flex pattern. */ export const Flex = forwardRef(function Flex(props, ref) { const [patternProps, restProps] = splitProps(props, [ 'align', 'justify', 'direction', 'wrap', 'basis', 'grow', 'shrink', 'gap', ]); const styles = flex.raw(patternProps); return _jsx(styled.div, { ref: ref, ...styles, ...restProps }); }); Flex.displayName = 'Flex';