From 2f21581007c09444ebacce662e09877dc1d2a2ec Mon Sep 17 00:00:00 2001 From: Kyle McCullen Date: Thu, 6 Feb 2025 17:52:43 -0500 Subject: [PATCH 1/2] fix: allow word wrap prop for CardTitle --- components/Alert.tsx | 4 +++- components/ui/card.tsx | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/components/Alert.tsx b/components/Alert.tsx index 669a9ee..b6cc713 100644 --- a/components/Alert.tsx +++ b/components/Alert.tsx @@ -39,7 +39,9 @@ function Alert({ title, description, type, icon: Icon, className }: Props) { - {title} + + {title} + {description} diff --git a/components/ui/card.tsx b/components/ui/card.tsx index 87cb6a4..112c90b 100644 --- a/components/ui/card.tsx +++ b/components/ui/card.tsx @@ -33,13 +33,13 @@ CardHeader.displayName = "CardHeader"; const CardTitle = React.forwardRef< TextRef, - React.ComponentPropsWithoutRef ->(({ className, ...props }, ref) => ( + React.ComponentPropsWithoutRef & { wrapText?: boolean } +>(({ className, wrapText = false, ...props }, ref) => ( Date: Fri, 7 Feb 2025 10:11:55 +0530 Subject: [PATCH 2/2] fix: remove number of lines prop in CardTitle --- components/Alert.tsx | 4 +--- components/ui/card.tsx | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/components/Alert.tsx b/components/Alert.tsx index b6cc713..669a9ee 100644 --- a/components/Alert.tsx +++ b/components/Alert.tsx @@ -39,9 +39,7 @@ function Alert({ title, description, type, icon: Icon, className }: Props) { - - {title} - + {title} {description} diff --git a/components/ui/card.tsx b/components/ui/card.tsx index 112c90b..0de1507 100644 --- a/components/ui/card.tsx +++ b/components/ui/card.tsx @@ -33,13 +33,12 @@ CardHeader.displayName = "CardHeader"; const CardTitle = React.forwardRef< TextRef, - React.ComponentPropsWithoutRef & { wrapText?: boolean } ->(({ className, wrapText = false, ...props }, ref) => ( + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => (