Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
michaldudak committed Sep 6, 2023
2 parents b667663 + 1a47213 commit 7a882ac
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 76 deletions.
31 changes: 13 additions & 18 deletions docs/data/material/components/buttons/InputFileUpload.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<Button
component="label"
variant="contained"
startIcon={<CloudUploadIcon />}
href="#file-upload"
>
Upload a file
<Button component="label" variant="contained" startIcon={<CloudUploadIcon />}>
Upload file
<VisuallyHiddenInput type="file" />
</Button>
);
Expand Down
31 changes: 13 additions & 18 deletions docs/data/material/components/buttons/InputFileUpload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<Button
component="label"
variant="contained"
startIcon={<CloudUploadIcon />}
href="#file-upload"
>
Upload a file
<Button component="label" variant="contained" startIcon={<CloudUploadIcon />}>
Upload file
<VisuallyHiddenInput type="file" />
</Button>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
<Button
component="label"
variant="contained"
startIcon={<CloudUploadIcon />}
href="#file-upload"
>
Upload a file
<Button component="label" variant="contained" startIcon={<CloudUploadIcon />}>
Upload file
<VisuallyHiddenInput type="file" />
</Button>
2 changes: 1 addition & 1 deletion packages/mui-lab/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"@mui/system": "workspace:^",
"@mui/types": "workspace:^",
"@mui/utils": "workspace:^",
"@mui/x-tree-view": "https://pkg.csb.dev/mui/mui-x/commit/1f23b33d/@mui/x-tree-view",
"@mui/x-tree-view": "6.0.0-alpha.1",
"clsx": "^2.0.0",
"prop-types": "^15.8.1"
},
Expand Down
34 changes: 2 additions & 32 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7a882ac

Please sign in to comment.