fix gluestackUI
This commit is contained in:
26
ArtisanConnect/components/ui/card/index.tsx
Normal file
26
ArtisanConnect/components/ui/card/index.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
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.ComponentRef<typeof View>, ICardProps>(
|
||||
function Card(
|
||||
{ className, size = 'md', variant = 'elevated', ...props },
|
||||
ref
|
||||
) {
|
||||
return (
|
||||
<View
|
||||
className={cardStyle({ size, variant, class: className })}
|
||||
{...props}
|
||||
ref={ref}
|
||||
/>
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
Card.displayName = 'Card';
|
||||
|
||||
export { Card };
|
||||
Reference in New Issue
Block a user