From 2ce9e552b7bb9c8ccb643d66d73c5b9d8c9a05ff Mon Sep 17 00:00:00 2001 From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com> Date: Tue, 5 Sep 2023 18:57:08 -0300 Subject: [PATCH] follow up on Upload button demo on Material UI --- .../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 ( - ); 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 ( - ); 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 @@ - \ No newline at end of file