Skip to content

Commit d76b9f3

Browse files
committed
fix: build error
1 parent 11dd78e commit d76b9f3

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

.changeset/cyan-eagles-camp.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'react-image-previewer': major
3+
---
4+
5+
publish

apps/example/components/doc-components.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ export const Image = React.forwardRef<HTMLImageElement, React.ImgHTMLAttributes<
2727
},
2828
)
2929

30+
Image.displayName = 'DocImage'
31+
3032
interface ButtonProps extends React.HtmlHTMLAttributes<HTMLDivElement> {
3133
primary?: boolean
3234
children?: React.ReactNode
@@ -50,10 +52,14 @@ export const Button = React.forwardRef<HTMLDivElement, ButtonProps>(
5052
},
5153
)
5254

55+
Button.displayName = 'DocButton'
56+
5357
export const Overlay: React.FC = ({ children }) => {
5458
return (
5559
<div tw="absolute left-0 bottom-0 p-2 w-full min-h-[24px] text-sm text-slate-300 z-50 bg-black/50">
5660
{children}
5761
</div>
5862
)
5963
}
64+
65+
Overlay.displayName = 'DocOverlay'

apps/example/components/features.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ const Feature = ({ text, icon }: { text: string; icon: React.ReactNode }) => (
5858
</StyledFeature>
5959
)
6060

61+
Feature.displayName = 'Feature'
62+
6163
const TITLE_WITH_TRANSLATIONS: Record<string, string> = {
6264
'en-US': 'A beautiful photo preview component',
6365
'zh-CN': '一款超精致的 React 图片预览组件',
@@ -103,7 +105,7 @@ const StyledFeatures = styled.div`
103105
}
104106
`
105107

106-
export default () => {
108+
const Features = () => {
107109
const { locale, defaultLocale } = useRouter()
108110

109111
const featureText = (key: number) => FEATURES_WITH_TRANSLATIONS[locale ?? defaultLocale!]?.[key]
@@ -119,3 +121,7 @@ export default () => {
119121
</div>
120122
)
121123
}
124+
125+
Features.displayName = 'Features'
126+
127+
export default Features

0 commit comments

Comments
 (0)