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.
24 lines
617 B
24 lines
617 B
import React from 'react';
|
|
import type { VariantProps } from '@gluestack-ui/nativewind-utils';
|
|
import { View, ViewProps } from 'react-native';
|
|
import { cardStyle } from './styles';
|
|
|
|
type ICardProps = ViewProps &
|
|
VariantProps<typeof cardStyle> & { className?: string };
|
|
|
|
const Card = React.forwardRef<React.ElementRef<typeof View>, ICardProps>(
|
|
({ className, size = 'md', variant = 'elevated', ...props }, ref) => {
|
|
return (
|
|
<View
|
|
className={cardStyle({ size, variant, class: className })}
|
|
{...props}
|
|
ref={ref}
|
|
/>
|
|
);
|
|
}
|
|
);
|
|
|
|
Card.displayName = 'Card';
|
|
|
|
export { Card };
|