From c7d31d422896e22152ef93350846e38a7a50f025 Mon Sep 17 00:00:00 2001 From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com> Date: Mon, 18 Sep 2023 17:51:39 -0300 Subject: [PATCH] explore the global variants demo --- .../components/productJoyUI/JoyUIFeatures.tsx | 155 +++++++----------- 1 file changed, 61 insertions(+), 94 deletions(-) diff --git a/docs/src/components/productJoyUI/JoyUIFeatures.tsx b/docs/src/components/productJoyUI/JoyUIFeatures.tsx index 0f01e209953267..bd15ed6202c785 100644 --- a/docs/src/components/productJoyUI/JoyUIFeatures.tsx +++ b/docs/src/components/productJoyUI/JoyUIFeatures.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { styled } from '@mui/material/styles'; +import { styled, alpha } from '@mui/material/styles'; import Box from '@mui/material/Box'; import JoyBox from '@mui/joy/Box'; import Button from '@mui/material/Button'; @@ -9,8 +9,6 @@ import { ColorPaletteProp, VariantProp } from '@mui/joy/styles'; import JoyFormControl from '@mui/joy/FormControl'; import JoyFormLabel from '@mui/joy/FormLabel'; import JoySlider, { sliderClasses as joySliderClasses } from '@mui/joy/Slider'; -import JoySelect from '@mui/joy/Select'; -import JoyOption from '@mui/joy/Option'; import JoySvgIcon from '@mui/joy/SvgIcon'; import JoyButton from '@mui/joy/Button'; import JoyCard from '@mui/joy/Card'; @@ -18,7 +16,9 @@ import JoyChip from '@mui/joy/Chip'; import JoyIconButton from '@mui/joy/IconButton'; import JoyTypography from '@mui/joy/Typography'; import JoySwitch from '@mui/joy/Switch'; +import JoyAlert from '@mui/joy/Alert'; import AutoAwesomeRoundedIcon from '@mui/icons-material/AutoAwesomeRounded'; +import PlaylistAddCheckCircleRoundedIcon from '@mui/icons-material/PlaylistAddCheckCircleRounded'; import RestartAltIcon from '@mui/icons-material/RestartAlt'; import AutoFixHighIcon from '@mui/icons-material/AutoFixHigh'; import BookmarkBorderIcon from '@mui/icons-material/BookmarkBorder'; @@ -36,11 +36,11 @@ import MarkdownElement from 'docs/src/components/markdown/MarkdownElement'; import useResizeHandle from 'docs/src/modules/utils/useResizeHandle'; const StyledButton = styled(Button)(({ theme }) => ({ - minWidth: 48, + minWidth: 52, borderRadius: 40, - padding: theme.spacing('2px', 1), + padding: theme.spacing('1px', 1, '2px', 1), fontSize: theme.typography.pxToRem(12), - lineHeight: 18 / 12, + lineHeight: 1.5, '&.MuiButton-text': { color: theme.palette.grey[500], border: '1px solid', @@ -66,91 +66,58 @@ function GlobalVariantDemo() { - - Screen - ({ + p: 3, + bgcolor: 'rgb(0,0,0 / 0.9)', + border: '1px solid', + borderColor: 'grey.200', + borderRadius: 0.8, + display: 'flex', + flexDirection: 'column', + justifyContent: 'center', + gap: 2, + ...theme.applyDarkStyles({ + bgcolor: alpha(theme.palette.primaryDark[800], 0.8), + borderColor: 'primaryDark.700', + }), + })} + > + +
+ + A new user interface library + + + Many Joy UI component share the same variants set! + + + Ensuring consistency, predictability, and joy for your experience developing with + Joy UI. + +
+ +
+ } > - - - - - - - - Smartphone - - - - - - - - - - Tablet - - - - - - - - Laptop - -
-
+ Your component library has been installed successfully! + + + View all components + +
- - … -`} + code={` + A new user interface library + +}> + Your component library has been installed successfully! + + + `} language="jsx" />