chore: set hideCornerMark to optional

This commit is contained in:
Joel 2024-10-15 21:45:30 +08:00
parent aa61a890b2
commit 89fb6eb648

View File

@ -16,6 +16,7 @@ type Props = {
locale: Locale // The component is used in both client and server side, so we can't get the locale from both side(getLocaleOnServer and useContext) locale: Locale // The component is used in both client and server side, so we can't get the locale from both side(getLocaleOnServer and useContext)
titleLeft?: React.ReactNode titleLeft?: React.ReactNode
installed?: boolean installed?: boolean
hideCornerMark?: boolean
descriptionLineRows?: number descriptionLineRows?: number
footer?: React.ReactNode footer?: React.ReactNode
serverLocale?: Locale serverLocale?: Locale
@ -28,6 +29,7 @@ const Card = ({
payload, payload,
titleLeft, titleLeft,
installed, installed,
hideCornerMark,
descriptionLineRows = 2, descriptionLineRows = 2,
footer, footer,
locale, locale,
@ -45,7 +47,7 @@ const Card = ({
return ( return (
<div className={cn('relative p-4 pb-3 border-[0.5px] border-components-panel-border bg-components-panel-on-panel-item-bg hover-bg-components-panel-on-panel-item-bg rounded-xl shadow-xs', className)}> <div className={cn('relative p-4 pb-3 border-[0.5px] border-components-panel-border bg-components-panel-on-panel-item-bg hover-bg-components-panel-on-panel-item-bg rounded-xl shadow-xs', className)}>
{!isLoading && <CornerMark text={type} />} {!hideCornerMark && !isLoading && <CornerMark text={type} />}
{/* Header */} {/* Header */}
<div className="flex"> <div className="flex">
{isLoading {isLoading