mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
show placeholder when favicon is loading
This commit is contained in:
22
commafeed-client/src/components/content/FeedFavicon.tsx
Normal file
22
commafeed-client/src/components/content/FeedFavicon.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import { ImageWithPlaceholderWhileLoading } from "components/ImageWithPlaceholderWhileLoading"
|
||||
|
||||
export interface FeedFaviconProps {
|
||||
url: string
|
||||
size?: number
|
||||
}
|
||||
|
||||
export function FeedFavicon({ url, size = 18 }: FeedFaviconProps) {
|
||||
return (
|
||||
<ImageWithPlaceholderWhileLoading
|
||||
src={url}
|
||||
alt="feed favicon"
|
||||
width={size}
|
||||
height={size}
|
||||
placeholderWidth={size}
|
||||
placeholderHeight={size}
|
||||
placeholderBackgroundColor="inherit"
|
||||
placeholderIconSize={size}
|
||||
placeholderIconColor="inherit"
|
||||
/>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user