Skip to content

Commit 41ba4af

Browse files
committed
Add transparency thing
1 parent 290bb8c commit 41ba4af

3 files changed

Lines changed: 18 additions & 4 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Live app: https://petertyliu.github.io/mui-theme-builder/
44

5-
Use this app to build/generate a basic MUI theme, which you can customize further by referring to the [MUI theming docs](https://mui.com/material-ui/customization/theming). Compatible with MUI 5 and higher.
5+
Use this app to build/generate a basic MUI theme, which you can customize further by referring to the [MUI theming docs](https://mui.com/material-ui/customization/theming). Built with MUI 7, Compatible with MUI 5 and higher.
66

77
Inspired by (but not forked from) [bareynol's MUI theme creator](https://bareynol.github.io/mui-theme-creator)
88

src/components/ColourPicker/ColorPicker.tsx

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,20 @@ export const ColorPicker = ({ value, onChange, name, ...fieldContainerProps }: C
5656
pointerEvents: "none",
5757
},
5858
}}
59-
/>
59+
>
60+
<Box
61+
sx={{
62+
position: "absolute",
63+
insetBlock: 0,
64+
insetInlineStart: 0,
65+
backgroundColor: value.substring(0, 7),
66+
width: "15px",
67+
borderRadius: "calc(var(--mui-shape-borderRadius) - 1px)",
68+
borderEndEndRadius: 0,
69+
borderStartEndRadius: 0,
70+
}}
71+
/>
72+
</Box>
6073
<Box
6174
id={name}
6275
popover="auto"
@@ -83,9 +96,10 @@ export const ColorPicker = ({ value, onChange, name, ...fieldContainerProps }: C
8396
name={name}
8497
ref={inputRef}
8598
key={value}
99+
autoCorrect="off"
100+
spellCheck="false"
86101
sx={{
87102
fontFamily: "monospace",
88-
89103
borderRadius: 1,
90104
borderStartStartRadius: 0,
91105
borderEndStartRadius: 0,

src/components/InfoPanel/InfoPanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const InfoPanel = () => {
2020
<Stack>
2121
<Typography variant="h5">MUI&nbsp;Theme&nbsp;Builder</Typography>
2222
<Typography variant="subtitle2" color="text.secondary">
23-
Compatible with MUI 5+
23+
Compatible with MUI 5 to 7
2424
</Typography>
2525
</Stack>
2626
<svg style={{ width: 0, height: 0, position: "absolute" }} aria-hidden="true" focusable="false">

0 commit comments

Comments
 (0)