- updated button to match
This commit is contained in:
@@ -36,7 +36,7 @@ const SystemFileUpload = ({ name, selectedFile }: SystemFileUploadProps) => {
|
||||
type="file"
|
||||
name="softwareUpdate"
|
||||
id="softwareUpdate"
|
||||
className="file:px-10 file:border file:border-gray-500 file:rounded-lg file:bg-blue-800 file:mr-5 w-full max-w-xs"
|
||||
className="mt-4 w-full flex flex-col items-center justify-center rounded-2xl border border-slate-800 bg-slate-900/40 p-10 text-center file:px-3 file:border file:border-gray-500 file:rounded-lg file:bg-blue-800 file:mr-5"
|
||||
onChange={(event) => {
|
||||
const file = event.currentTarget.files?.[0];
|
||||
if (!file) {
|
||||
@@ -44,8 +44,7 @@ const SystemFileUpload = ({ name, selectedFile }: SystemFileUploadProps) => {
|
||||
return;
|
||||
}
|
||||
|
||||
if (file?.size > 8 * 1024 * 1024)
|
||||
toast.error("File is too large (max 8MB).");
|
||||
if (file?.size > 8 * 1024 * 1024) toast.error("File is too large (max 8MB).");
|
||||
setFieldValue(name, file);
|
||||
}}
|
||||
/>
|
||||
@@ -53,7 +52,7 @@ const SystemFileUpload = ({ name, selectedFile }: SystemFileUploadProps) => {
|
||||
</FormGroup>
|
||||
<button
|
||||
type="button"
|
||||
className="w-full md:w-[50%] text-white bg-[#26B170] hover:bg-green-700 font-small rounded-lg text-sm px-2 py-2.5 disabled:opacity-50 disabled:cursor-not-allowed"
|
||||
className="w-1/4 text-white bg-green-700 hover:bg-green-800 font-small rounded-lg text-sm px-2 py-2.5 disabled:opacity-50 disabled:cursor-not-allowed"
|
||||
disabled={!selectedFile}
|
||||
onClick={handleFileUploadClick}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user