Skip to content

Commit

Permalink
fix: object fit for logo on welcome card (#1835)
Browse files Browse the repository at this point in the history
Co-authored-by: pandeymangg <anshuman.pandey9999@gmail.com>
  • Loading branch information
jobenjada and pandeymangg committed Dec 28, 2023
1 parent d91e1cc commit 8a4ceae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ export default function EditWelcomeCard({
updateSurvey({ fileUrl: url[0] });
}}
fileUrl={localSurvey?.welcomeCard?.fileUrl}
imageFit="contain"
/>
</div>
<div className="mt-3">
Expand Down
4 changes: 3 additions & 1 deletion packages/ui/FileInput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ interface FileInputProps {
onFileUpload: (uploadedUrl: string[] | undefined) => void;
fileUrl?: string | string[];
multiple?: boolean;
imageFit?: "cover" | "contain";
}

interface SelectedFile {
Expand All @@ -38,6 +39,7 @@ const FileInput: React.FC<FileInputProps> = ({
onFileUpload,
fileUrl,
multiple = false,
imageFit = "cover",
}) => {
const [selectedFiles, setSelectedFiles] = useState<SelectedFile[]>([]);

Expand Down Expand Up @@ -252,7 +254,7 @@ const FileInput: React.FC<FileInputProps> = ({
src={selectedFiles[0].url}
alt={selectedFiles[0].name}
fill
style={{ objectFit: "cover" }}
style={{ objectFit: imageFit }}
quality={100}
className={!selectedFiles[0].uploaded ? "opacity-50" : ""}
/>
Expand Down

2 comments on commit 8a4ceae

@vercel
Copy link

@vercel vercel bot commented on 8a4ceae Dec 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

formbricks-com – ./apps/formbricks-com

formbricks.com
formbricks-com-formbricks.vercel.app
formbricks-com-git-main-formbricks.vercel.app
formbricks-com.vercel.app
www.formbricks.com

@vercel
Copy link

@vercel vercel bot commented on 8a4ceae Dec 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.