иконки кнопок и слайдер в цвет темы
This commit is contained in:
parent
379ace36e2
commit
b22c2bd873
@ -1,6 +1,8 @@
|
|||||||
import { Box } from "@mui/material";
|
import { Box, SxProps, Theme } from "@mui/material";
|
||||||
|
interface Props {
|
||||||
export default function CalendarIcon() {
|
sx?: SxProps<Theme>;
|
||||||
|
}
|
||||||
|
export default function CalendarIcon({ sx }: Props) {
|
||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
@ -20,6 +22,7 @@ export default function CalendarIcon() {
|
|||||||
"&:active rect": {
|
"&:active rect": {
|
||||||
stroke: "#FB5607",
|
stroke: "#FB5607",
|
||||||
},
|
},
|
||||||
|
...sx
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<svg width="20" height="22" viewBox="0 0 20 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg width="20" height="22" viewBox="0 0 20 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Slider, useTheme } from "@mui/material";
|
import { Slider, SxProps, Theme, useTheme } from "@mui/material";
|
||||||
|
|
||||||
type CustomSliderProps = {
|
type CustomSliderProps = {
|
||||||
defaultValue?: number;
|
defaultValue?: number;
|
||||||
@ -6,6 +6,7 @@ type CustomSliderProps = {
|
|||||||
min?: number;
|
min?: number;
|
||||||
max?: number;
|
max?: number;
|
||||||
step?: number;
|
step?: number;
|
||||||
|
sx?: SxProps<Theme>;
|
||||||
onChange?: (_: Event, value: number | number[]) => void;
|
onChange?: (_: Event, value: number | number[]) => void;
|
||||||
onChangeCommitted?: (_: React.SyntheticEvent | Event, value: number | number[]) => void;
|
onChangeCommitted?: (_: React.SyntheticEvent | Event, value: number | number[]) => void;
|
||||||
};
|
};
|
||||||
@ -18,6 +19,7 @@ export const CustomSlider = ({
|
|||||||
step,
|
step,
|
||||||
onChange,
|
onChange,
|
||||||
onChangeCommitted,
|
onChangeCommitted,
|
||||||
|
sx,
|
||||||
}: CustomSliderProps) => {
|
}: CustomSliderProps) => {
|
||||||
// const handleChange = ({ type }: Event, newValue: number | number[]) => {
|
// const handleChange = ({ type }: Event, newValue: number | number[]) => {
|
||||||
// // Для корректной работы слайдера в FireFox
|
// // Для корректной работы слайдера в FireFox
|
||||||
@ -71,6 +73,7 @@ export const CustomSlider = ({
|
|||||||
"& .MuiSlider-track": {
|
"& .MuiSlider-track": {
|
||||||
height: "12px",
|
height: "12px",
|
||||||
},
|
},
|
||||||
|
...sx
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
import { Box, useTheme } from "@mui/material";
|
import { Box, useTheme } from "@mui/material";
|
||||||
|
interface Props {
|
||||||
|
color?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function RadioCheck({ color = "#7E2AEA" }: Props) {
|
||||||
export default function RadioCheck() {
|
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -16,7 +18,7 @@ export default function RadioCheck() {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<rect x="0.5" y="0.5" width="25" height="25" rx="12.5" fill="#7E2AEA" stroke="#7E2AEA"/>
|
<rect x="0.5" y="0.5" width="25" height="25" rx="12.5" fill={color} stroke={color}/>
|
||||||
<rect x="8" y="8" width="10" height="10" rx="5" fill="white"/>
|
<rect x="8" y="8" width="10" height="10" rx="5" fill="white"/>
|
||||||
</svg>
|
</svg>
|
||||||
</Box>
|
</Box>
|
||||||
|
Loading…
Reference in New Issue
Block a user