Skip to content

Commit

Permalink
fix: use ThemedImage for marks in the Showcase mdx component, closes #79
Browse files Browse the repository at this point in the history
  • Loading branch information
jeangovil committed Jun 22, 2023
1 parent 00701b7 commit 80c9b36
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Typography } from '@acid-info/lsd-react'
import { useColorMode } from '@docusaurus/theme-common'
import ThemedImage from '@theme/ThemedImage'
import clsx from 'clsx'
import React from 'react'
import './Showcase.scss'
Expand All @@ -24,18 +24,17 @@ export const Showcase: React.FC<ShowcaseProps> = ({
children,
...props
}) => {
const { isDarkTheme } = useColorMode()

return (
<div className={clsx(className, 'mdx-showcase')} {...props}>
{items.map((item, index) => {
const logoSrc = item.logo ?? item.logoDark

return (
<div key={index} className="mdx-showcase__item">
<div key={index} className="mdx-showcase__item-inner">
<img
src={(isDarkTheme ? item.logoDark : item.logo) ?? logoSrc}
<ThemedImage
sources={{
dark: item.logoDark,
light: item.logo,
}}
alt={typeof item.name === 'string' ? item.name : 'image'}
className="mdx-showcase__item-logo"
/>
Expand Down

0 comments on commit 80c9b36

Please sign in to comment.