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

16 lines (15 loc) 540 B
'use client'; import { jsx as _jsx } from "react/jsx-runtime"; import { forwardRef } from 'react'; import { ark } from '@ark-ui/react/factory'; import { styled } from '@fidely-ui/styled-system/jsx'; const StyledImg = styled(ark.img); /** * Fidely UI Image component * Supports `fit` and `align` */ export const Image = forwardRef(function Image(props, ref) { const { fit = 'cover', align, ...rest } = props; return (_jsx(StyledImg, { ref: ref, objectFit: fit, objectPosition: align, ...rest })); }); Image.displayName = 'Image';