import Typography from "@mui/material/Typography"; import { forwardRef } from "react"; import Slider from "@mui/material/Slider"; import type { SliderProps } from "@mui/material/Slider"; import { useTheme } from "@mui/material/styles"; import Stack from "@mui/material/Stack"; import { FieldLabel } from "./FieldLabel"; import Box from "@mui/material/Box"; import type { ResponsiveStyleValue } from "@mui/system"; interface SliderInputProps extends SliderProps { sx?: SliderProps["sx"]; showValue?: boolean; } export const SliderInput = forwardRef( ({ sx, showValue = false, ...props }, ref) => { const theme = useTheme(); const additionalSx = Array.isArray(sx) ? sx : sx ? [sx] : []; return ( {showValue && {props.value}} ); } ); interface SliderWithLabelProps extends SliderProps { fieldLabel?: string; required?: boolean; showValue?: boolean; sliderMaxWidth?: ResponsiveStyleValue; } export const SliderWithLabel = forwardRef( ( { fieldLabel, required, showValue = true, value, sliderMaxWidth = "100%", ...props }, ref ) => { const theme = useTheme(); const labelText = fieldLabel; return ( {fieldLabel && {labelText}} ); } );