Skip to content

Commit

Permalink
yarn docs:typescript:formatted
Browse files Browse the repository at this point in the history
  • Loading branch information
danilo-leal committed Aug 10, 2023
1 parent e4bfa94 commit 54fbb10
Showing 1 changed file with 24 additions and 10 deletions.
34 changes: 24 additions & 10 deletions docs/data/joy/customization/theme-colors/PaletteThemeViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Sheet from '@mui/joy/Sheet';
import LightMode from '@mui/icons-material/LightModeOutlined';
import DarkMode from '@mui/icons-material/DarkModeOutlined';
import InfoOutlined from '@mui/icons-material/InfoOutlined';
import Check from '@mui/icons-material/Check';
import CheckCircleRoundedIcon from '@mui/icons-material/CheckCircleRounded';
import useClipboardCopy from 'docs/src/modules/utils/useClipboardCopy';

const defaultTheme = extendTheme();
Expand Down Expand Up @@ -37,17 +37,14 @@ const collator = new Intl.Collator(undefined, {
});

const Table = styled('table')(({ theme }) => ({
border: '1px solid',
borderColor: theme.vars.palette.divider,
borderRadius: '12px',
borderCollapse: 'separate',
borderSpacing: 0,
display: 'block',
height: 500,
overflowY: 'scroll',
th: {
textAlign: 'left',
padding: '8px 6px',
padding: 8,
position: 'sticky',
top: 0,
zIndex: 1,
Expand Down Expand Up @@ -102,7 +99,18 @@ export default function PaletteThemeViewer() {
);

return (
<Box sx={{ width: '100%', overflow: 'hidden', position: 'relative' }}>
<Box
sx={{
marginBottom: '-9px',
width: '100%',
overflow: 'hidden',
position: 'relative',
border: '1px solid',
borderColor: 'divider',
borderTopLeftRadius: '12px',
borderTopRightRadius: '12px',
}}
>
<Sheet
variant="solid"
color="success"
Expand All @@ -115,13 +123,18 @@ export default function PaletteThemeViewer() {
})`,
transition: '0.3s',
p: 0.5,
px: 0.75,
borderRadius: 'xs',
boxShadow: 'sm',
pl: 0.5,
pr: 1,
borderRadius: 'xl',
boxShadow: 'md',
zIndex: 1,
}}
>
<Typography level="body-xs" textColor="inherit" startDecorator={<Check />}>
<Typography
level="body-xs"
textColor="inherit"
startDecorator={<CheckCircleRoundedIcon fontSize="small" />}
>
Copied
</Typography>
</Sheet>
Expand Down Expand Up @@ -164,6 +177,7 @@ export default function PaletteThemeViewer() {
color="neutral"
textColor="inherit"
fontSize="sm"
fontWeight={500}
textAlign="left"
onClick={() => copy(token)}
endDecorator={
Expand Down

0 comments on commit 54fbb10

Please sign in to comment.