From 42005c6fdcee28357e1b47a7f6d71e23553afd59 Mon Sep 17 00:00:00 2001
From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Date: Wed, 6 Sep 2023 07:35:29 -0300
Subject: [PATCH] [material-ui][Button] Update the file upload demo (#38823)
---
.../components/buttons/InputFileUpload.js | 31 ++++++++-----------
.../components/buttons/InputFileUpload.tsx | 31 ++++++++-----------
.../buttons/InputFileUpload.tsx.preview | 9 ++----
3 files changed, 28 insertions(+), 43 deletions(-)
diff --git a/docs/data/material/components/buttons/InputFileUpload.js b/docs/data/material/components/buttons/InputFileUpload.js
index f053ce2dd2c511..27e8b252fc94da 100644
--- a/docs/data/material/components/buttons/InputFileUpload.js
+++ b/docs/data/material/components/buttons/InputFileUpload.js
@@ -3,27 +3,22 @@ import { styled } from '@mui/material/styles';
import Button from '@mui/material/Button';
import CloudUploadIcon from '@mui/icons-material/CloudUpload';
-const VisuallyHiddenInput = styled('input')`
- clip: rect(0 0 0 0);
- clip-path: inset(50%);
- height: 1px;
- overflow: hidden;
- position: absolute;
- bottom: 0;
- left: 0;
- white-space: nowrap;
- width: 1px;
-`;
+const VisuallyHiddenInput = styled('input')({
+ clip: 'rect(0 0 0 0)',
+ clipPath: 'inset(50%)',
+ height: 1,
+ overflow: 'hidden',
+ position: 'absolute',
+ bottom: 0,
+ left: 0,
+ whiteSpace: 'nowrap',
+ width: 1,
+});
export default function InputFileUpload() {
return (
- }
- href="#file-upload"
- >
- Upload a file
+ }>
+ Upload file
);
diff --git a/docs/data/material/components/buttons/InputFileUpload.tsx b/docs/data/material/components/buttons/InputFileUpload.tsx
index f053ce2dd2c511..27e8b252fc94da 100644
--- a/docs/data/material/components/buttons/InputFileUpload.tsx
+++ b/docs/data/material/components/buttons/InputFileUpload.tsx
@@ -3,27 +3,22 @@ import { styled } from '@mui/material/styles';
import Button from '@mui/material/Button';
import CloudUploadIcon from '@mui/icons-material/CloudUpload';
-const VisuallyHiddenInput = styled('input')`
- clip: rect(0 0 0 0);
- clip-path: inset(50%);
- height: 1px;
- overflow: hidden;
- position: absolute;
- bottom: 0;
- left: 0;
- white-space: nowrap;
- width: 1px;
-`;
+const VisuallyHiddenInput = styled('input')({
+ clip: 'rect(0 0 0 0)',
+ clipPath: 'inset(50%)',
+ height: 1,
+ overflow: 'hidden',
+ position: 'absolute',
+ bottom: 0,
+ left: 0,
+ whiteSpace: 'nowrap',
+ width: 1,
+});
export default function InputFileUpload() {
return (
- }
- href="#file-upload"
- >
- Upload a file
+ }>
+ Upload file
);
diff --git a/docs/data/material/components/buttons/InputFileUpload.tsx.preview b/docs/data/material/components/buttons/InputFileUpload.tsx.preview
index 7763b53206c8ad..9cdb1581fda0ad 100644
--- a/docs/data/material/components/buttons/InputFileUpload.tsx.preview
+++ b/docs/data/material/components/buttons/InputFileUpload.tsx.preview
@@ -1,9 +1,4 @@
-}
- href="#file-upload"
->
- Upload a file
+}>
+ Upload file
\ No newline at end of file