mirror of
https://github.com/System-End/site.git
synced 2026-04-19 19:45:07 +00:00
Fix use of forwardRef in Photo component
This commit is contained in:
parent
1fbb7fb67b
commit
575a7369da
1 changed files with 4 additions and 11 deletions
|
|
@ -17,17 +17,10 @@ const Caption = styled(Text)`
|
|||
z-index: 0;
|
||||
`
|
||||
|
||||
const Photo = React.forwardRef(function Photo({
|
||||
src,
|
||||
width,
|
||||
height,
|
||||
alt,
|
||||
showAlt,
|
||||
dark,
|
||||
loading,
|
||||
ref,
|
||||
...props
|
||||
}) {
|
||||
const Photo = React.forwardRef(function Photo(
|
||||
{ src, width, height, alt, showAlt, dark, loading, ...props },
|
||||
ref
|
||||
) {
|
||||
const [colorMode] = useColorMode()
|
||||
const showCaption = showAlt && alt
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue