github
1381 of 2779 branches covered (49.69%)
0 of 401 new or added lines in 12 files covered. (0.0%)
15 existing lines in 1 file now uncovered.13875 of 77128 relevant lines covered (17.99%)
1.8 hits per line
NEW
|
import { TeableNew } from '@teable/icons'; |
|
NEW
|
import { cn } from '@teable/ui-lib/shadcn'; |
× |
NEW
|
import Image from 'next/image'; |
× |
NEW
|
import { usePreviewUrl } from '../../hooks/usePreviewUrl'; |
× |
NEW
|
|
× |
NEW
|
export const OAuthLogo = (props: { logo?: string; name: string; className?: string }) => { |
× |
NEW
|
const { logo, name, className } = props;
|
× |
NEW
|
|
× |
NEW
|
const getPreviewUrl = usePreviewUrl();
|
× |
NEW
|
return (
|
× |
NEW
|
<div className={cn('relative size-16 overflow-hidden rounded-sm', className)}> |
× |
NEW
|
{logo ? ( |
× |
NEW
|
<Image |
× |
NEW
|
src={getPreviewUrl(logo)} |
× |
NEW
|
alt={name} |
× |
NEW
|
fill |
× |
NEW
|
sizes="100%"
|
× |
NEW
|
style={{ |
× |
NEW
|
objectFit: 'contain', |
× |
NEW
|
}} |
× |
NEW
|
/> |
× |
NEW
|
) : ( |
× |
NEW
|
<TeableNew className={cn('size-16 text-black', className)} /> |
× |
NEW
|
)} |
× |
NEW
|
</div> |
× |
NEW
|
); |
× |
NEW
|
}; |
× |