廓形仪rn版本-技术调研
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
552 B

  1. import React from 'react';
  2. import { cardStyle } from './styles';
  3. import type { VariantProps } from '@gluestack-ui/nativewind-utils';
  4. type ICardProps = React.ComponentPropsWithoutRef<'div'> &
  5. VariantProps<typeof cardStyle>;
  6. const Card = React.forwardRef<HTMLDivElement, ICardProps>(function Card(
  7. { className, size = 'md', variant = 'elevated', ...props },
  8. ref
  9. ) {
  10. return (
  11. <div
  12. className={cardStyle({ size, variant, class: className })}
  13. {...props}
  14. ref={ref}
  15. />
  16. );
  17. });
  18. Card.displayName = 'Card';
  19. export { Card };