Skip to content

Commit

Permalink
feat: [docs][base][Popper] Move styles to the bottom of demos code
Browse files Browse the repository at this point in the history
Co-authored-by: seunexplicit <[email protected]>
  • Loading branch information
gitstart and seunexplicit committed Mar 20, 2023
1 parent 7dd200f commit 04a3455
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
20 changes: 10 additions & 10 deletions docs/data/base/components/popper/SimplePopper.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,6 @@ import * as React from 'react';
import PopperUnstyled from '@mui/base/PopperUnstyled';
import { styled } from '@mui/system';

const StyledPopperDiv = styled('div')(
({ theme }) => `
padding: 0.5rem;
border: 1px solid;
background-color: ${theme.palette.mode === 'dark' ? '#121212' : '#fff'};
opacity: 1;
margin: 0.25rem 0px;
`,
);

export default function SimplePopper() {
const [anchorEl, setAnchorEl] = React.useState(null);

Expand All @@ -33,3 +23,13 @@ export default function SimplePopper() {
</div>
);
}

const StyledPopperDiv = styled('div')(
({ theme }) => `
padding: 0.5rem;
border: 1px solid;
background-color: ${theme.palette.mode === 'dark' ? '#121212' : '#fff'};
opacity: 1;
margin: 0.25rem 0px;
`,
);
20 changes: 10 additions & 10 deletions docs/data/base/components/popper/SimplePopper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,6 @@ import * as React from 'react';
import PopperUnstyled from '@mui/base/PopperUnstyled';
import { styled, Theme } from '@mui/system';

const StyledPopperDiv = styled('div')(
({ theme }: { theme: Theme }) => `
padding: 0.5rem;
border: 1px solid;
background-color: ${theme.palette.mode === 'dark' ? '#121212' : '#fff'};
opacity: 1;
margin: 0.25rem 0px;
`,
);

export default function SimplePopper() {
const [anchorEl, setAnchorEl] = React.useState<null | HTMLElement>(null);

Expand All @@ -33,3 +23,13 @@ export default function SimplePopper() {
</div>
);
}

const StyledPopperDiv = styled('div')(
({ theme }: { theme: Theme }) => `
padding: 0.5rem;
border: 1px solid;
background-color: ${theme.palette.mode === 'dark' ? '#121212' : '#fff'};
opacity: 1;
margin: 0.25rem 0px;
`,
);

0 comments on commit 04a3455

Please sign in to comment.