mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-13 16:22:59 +10:00
design nosepass template, add tests, add template previews
This commit is contained in:
@ -8,6 +8,7 @@ type PictureProps = {
|
||||
|
||||
export const Picture = ({ className }: PictureProps) => {
|
||||
const picture = useArtboardStore((state) => state.resume.basics.picture);
|
||||
const fontSize = useArtboardStore((state) => state.resume.metadata.typography.font.size);
|
||||
|
||||
if (!isUrl(picture.url) || picture.effects.hidden) return null;
|
||||
|
||||
@ -15,11 +16,17 @@ export const Picture = ({ className }: PictureProps) => {
|
||||
<img
|
||||
src={picture.url}
|
||||
alt="Profile"
|
||||
className={cn("relative z-20 object-cover", className)}
|
||||
className={cn(
|
||||
"relative z-20 object-cover",
|
||||
picture.effects.border && "border-primary",
|
||||
picture.effects.grayscale && "grayscale",
|
||||
className,
|
||||
)}
|
||||
style={{
|
||||
maxWidth: `${picture.size}px`,
|
||||
aspectRatio: `${picture.aspectRatio}`,
|
||||
borderRadius: `${picture.borderRadius}px`,
|
||||
borderWidth: `${picture.effects.border ? fontSize / 3 : 0}px`,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user