Skip to content

Commit

Permalink
[docs] Fix Fab demo overflow on mobile (#28033)
Browse files Browse the repository at this point in the history
Co-authored-by: Olivier Tassinari <[email protected]>
  • Loading branch information
rajzik and oliviertassinari authored Aug 30, 2021
1 parent c29d229 commit 65da499
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 28 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import * as React from 'react';
import Stack from '@material-ui/core/Stack';
import Box from '@material-ui/core/Box';
import Fab from '@material-ui/core/Fab';
import NavigationIcon from '@material-ui/icons/Navigation';

export default function FloatingActionButtonExtendedSize() {
return (
<Stack direction="row" alignItems="center" spacing={1}>
<Box sx={{ '& > :not(style)': { m: 1 } }}>
<Fab variant="extended" size="small" color="primary" aria-label="add">
<NavigationIcon sx={{ mr: 1 }} />
Extended
Expand All @@ -18,6 +18,6 @@ export default function FloatingActionButtonExtendedSize() {
<NavigationIcon sx={{ mr: 1 }} />
Extended
</Fab>
</Stack>
</Box>
);
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import * as React from 'react';
import Stack from '@material-ui/core/Stack';
import Box from '@material-ui/core/Box';
import Fab from '@material-ui/core/Fab';
import NavigationIcon from '@material-ui/icons/Navigation';

export default function FloatingActionButtonExtendedSize() {
return (
<Stack direction="row" alignItems="center" spacing={1}>
<Box sx={{ '& > :not(style)': { m: 1 } }}>
<Fab variant="extended" size="small" color="primary" aria-label="add">
<NavigationIcon sx={{ mr: 1 }} />
Extended
Expand All @@ -18,6 +18,6 @@ export default function FloatingActionButtonExtendedSize() {
<NavigationIcon sx={{ mr: 1 }} />
Extended
</Fab>
</Stack>
</Box>
);
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import * as React from 'react';
import Stack from '@material-ui/core/Stack';
import Box from '@material-ui/core/Box';
import Fab from '@material-ui/core/Fab';
import AddIcon from '@material-ui/icons/Add';

export default function FloatingActionButtonSize() {
return (
<Stack direction="row" alignItems="center" spacing={1}>
<Box sx={{ '& > :not(style)': { m: 1 } }}>
<Fab size="small" color="secondary" aria-label="add">
<AddIcon />
</Fab>
Expand All @@ -15,6 +15,6 @@ export default function FloatingActionButtonSize() {
<Fab color="secondary" aria-label="add">
<AddIcon />
</Fab>
</Stack>
</Box>
);
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import * as React from 'react';
import Stack from '@material-ui/core/Stack';
import Box from '@material-ui/core/Box';
import Fab from '@material-ui/core/Fab';
import AddIcon from '@material-ui/icons/Add';

export default function FloatingActionButtonSize() {
return (
<Stack direction="row" alignItems="center" spacing={1}>
<Box sx={{ '& > :not(style)': { m: 1 } }}>
<Fab size="small" color="secondary" aria-label="add">
<AddIcon />
</Fab>
Expand All @@ -15,6 +15,6 @@ export default function FloatingActionButtonSize() {
<Fab color="secondary" aria-label="add">
<AddIcon />
</Fab>
</Stack>
</Box>
);
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import Stack from '@material-ui/core/Stack';
import Box from '@material-ui/core/Box';
import Fab from '@material-ui/core/Fab';
import AddIcon from '@material-ui/icons/Add';
import EditIcon from '@material-ui/icons/Edit';
Expand All @@ -8,7 +8,7 @@ import NavigationIcon from '@material-ui/icons/Navigation';

export default function FloatingActionButtons() {
return (
<Stack direction="row" alignItems="center" spacing={1}>
<Box sx={{ '& > :not(style)': { m: 1 } }}>
<Fab color="primary" aria-label="add">
<AddIcon />
</Fab>
Expand All @@ -22,6 +22,6 @@ export default function FloatingActionButtons() {
<Fab disabled aria-label="like">
<FavoriteIcon />
</Fab>
</Stack>
</Box>
);
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import Stack from '@material-ui/core/Stack';
import Box from '@material-ui/core/Box';
import Fab from '@material-ui/core/Fab';
import AddIcon from '@material-ui/icons/Add';
import EditIcon from '@material-ui/icons/Edit';
Expand All @@ -8,7 +8,7 @@ import NavigationIcon from '@material-ui/icons/Navigation';

export default function FloatingActionButtons() {
return (
<Stack direction="row" alignItems="center" spacing={1}>
<Box sx={{ '& > :not(style)': { m: 1 } }}>
<Fab color="primary" aria-label="add">
<AddIcon />
</Fab>
Expand All @@ -22,6 +22,6 @@ export default function FloatingActionButtons() {
<Fab disabled aria-label="like">
<FavoriteIcon />
</Fab>
</Stack>
</Box>
);
}
6 changes: 1 addition & 5 deletions docs/src/pages/components/text-fields/InputWithIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ import AccountCircle from '@material-ui/icons/AccountCircle';

export default function InputWithIcon() {
return (
<Box
sx={{
'& > :not(style)': { m: 1 },
}}
>
<Box sx={{ '& > :not(style)': { m: 1 } }}>
<FormControl variant="standard">
<InputLabel htmlFor="input-with-icon-adornment">
With a start adornment
Expand Down
6 changes: 1 addition & 5 deletions docs/src/pages/components/text-fields/InputWithIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ import AccountCircle from '@material-ui/icons/AccountCircle';

export default function InputWithIcon() {
return (
<Box
sx={{
'& > :not(style)': { m: 1 },
}}
>
<Box sx={{ '& > :not(style)': { m: 1 } }}>
<FormControl variant="standard">
<InputLabel htmlFor="input-with-icon-adornment">
With a start adornment
Expand Down

0 comments on commit 65da499

Please sign in to comment.