Skip to content

Commit

Permalink
feat: optional logo props for Showcase
Browse files Browse the repository at this point in the history
  • Loading branch information
jinhojang6 committed Jul 7, 2023
1 parent 182c583 commit 0ed10ca
Showing 1 changed file with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import './Showcase.scss'

export type ShowcaseItem = {
name: React.ReactNode
logo: string
logoDark: string
logo?: string
logoDark?: string
description: React.ReactNode
}

Expand All @@ -30,14 +30,16 @@ export const Showcase: React.FC<ShowcaseProps> = ({
return (
<div key={index} className="mdx-showcase__item">
<div key={index} className="mdx-showcase__item-inner">
<ThemedImage
sources={{
dark: item.logoDark,
light: item.logo,
}}
alt={typeof item.name === 'string' ? item.name : 'image'}
className="mdx-showcase__item-logo"
/>
{item?.logo && item?.logoDark && (
<ThemedImage
sources={{
dark: item.logoDark,
light: item.logo,
}}
alt={typeof item.name === 'string' ? item.name : 'image'}
className="mdx-showcase__item-logo"
/>
)}
<Typography
variant="h3"
component="h2"
Expand Down

0 comments on commit 0ed10ca

Please sign in to comment.