Skip to content

Commit

Permalink
[docs][base] Move styles to the bottom of demos code for Popper (#3…
Browse files Browse the repository at this point in the history
  • Loading branch information
gitstart authored Apr 12, 2023
1 parent bbc352f commit dd9cdd4
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 dd9cdd4

Please sign in to comment.