-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: new images + work in progress component
* chore: dark mode image * chore: update pr template * chore: fix icon colors in dark mode * chore: add twitter in /help * chore: fix sidebar padding & new component * chore: remove dist * new images * Update github-integration.mdx * feat: add work in progress component + rounded corners for video * chore: update images * feat: caption with image * chore: fix gitignore * Update .gitignore * update images
- Loading branch information
1 parent
77f4285
commit 9dd23d1
Showing
23 changed files
with
182 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,21 @@ | ||
import React from "react" | ||
import useBaseUrl from "@docusaurus/useBaseUrl" | ||
import { useColorMode } from "@docusaurus/theme-common" | ||
import React from 'react'; | ||
import useBaseUrl from '@docusaurus/useBaseUrl'; | ||
import { useColorMode } from '@docusaurus/theme-common'; | ||
|
||
type ImageProps = { | ||
lightImage: string | ||
darkImage: string | ||
alt: string | ||
[key: string]: any | ||
} | ||
lightImage: string; | ||
darkImage?: string; | ||
alt: string; | ||
caption?: string; | ||
[key: string]: any; | ||
}; | ||
|
||
const Image: React.FC<ImageProps> = ({ | ||
lightImage, | ||
darkImage, | ||
alt, | ||
...props | ||
}) => { | ||
const { colorMode } = useColorMode() | ||
const Image: React.FC<ImageProps> = ({ lightImage, darkImage, alt, caption, ...props }) => { | ||
const { colorMode } = useColorMode(); | ||
|
||
const imageUrl = colorMode === "dark" ? darkImage : lightImage | ||
const imageUrl = colorMode === 'dark' ? darkImage : lightImage; | ||
|
||
return <img src={useBaseUrl(imageUrl)} alt={alt} {...props} /> | ||
} | ||
return <div className="py-0.5 text-center text-sm flex flex-col "><img className="mx-auto" src={useBaseUrl(imageUrl)} alt={alt} {...props} /><span className="pt-0.5 opacity-65">{caption}</span></div>; | ||
}; | ||
|
||
export default Image | ||
export default Image; |
Oops, something went wrong.