diff --git a/CHANGELOG.md b/CHANGELOG.md index 8cfcd73..5a6608b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.6.3] + +### Fixed + +- Fixed `variant` prop in `Card` component. + ## [1.6.2] ### Added diff --git a/src/molecules/Card/Card.tsx b/src/molecules/Card/Card.tsx index 975ed8f..6491feb 100644 --- a/src/molecules/Card/Card.tsx +++ b/src/molecules/Card/Card.tsx @@ -4,10 +4,16 @@ import { MetaCard } from './Meta'; import { CardStyles } from './styles'; import { RdCardCompoundedComponent, RdCardProps } from './types'; -export const CardInternal = ({ className, variant = 'default', ...antdProps }: RdCardProps) => { +export const CardInternal: React.FC = ({ + className, + variant = 'default', + ...antdProps +}) => { const variantClass: Record, string> = { compact: 'rd-card-variant-compact', - default: '', + default: 'rd-card-variant-default', + borderless: 'rd-card-variant-borderless', + outlined: 'rd-card-variant-outlined', }; return ; diff --git a/src/molecules/Card/types.ts b/src/molecules/Card/types.ts index c367b6c..ed2a1d8 100644 --- a/src/molecules/Card/types.ts +++ b/src/molecules/Card/types.ts @@ -25,7 +25,7 @@ type CardPropsExtend = { * * This property allows you to customize the appearance of the card to match specific design requirements. */ - variant?: 'default' | 'compact'; + variant?: 'default' | 'compact' | CardPropsAntd['variant']; }; type GridCardPropsExtend = {}; @@ -33,7 +33,7 @@ type MetaCardPropsExtend = {}; //#endregion //#region Export types -export type RdCardProps = CardPropsAntd & CardPropsExtend; +export type RdCardProps = Omit & CardPropsExtend; export type RdGridCardProps = GridCardPropsAntd & GridCardPropsExtend; export type RdMetaCardProps = MetaCardPropsAntd & MetaCardPropsExtend;