Some checks failed
No response / noResponse (push) Has been cancelled
CI / Continuous releases (push) Has been cancelled
CI / test-dev (macos-latest) (push) Has been cancelled
CI / test-dev (ubuntu-latest) (push) Has been cancelled
CI / test-dev (windows-latest) (push) Has been cancelled
Maintenance / main (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
36 lines
1.0 KiB
JavaScript
36 lines
1.0 KiB
JavaScript
import * as React from 'react';
|
|
import Box from '@mui/joy/Box';
|
|
import Button from '@mui/joy/Button';
|
|
import ButtonGroup from '@mui/joy/ButtonGroup';
|
|
import IconButton from '@mui/joy/IconButton';
|
|
import Slider from '@mui/joy/Slider';
|
|
import Settings from '@mui/icons-material/Settings';
|
|
|
|
export default function SeparatorButtonGroup() {
|
|
const [hue, setHue] = React.useState(0);
|
|
return (
|
|
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 2 }}>
|
|
<Slider
|
|
value={hue}
|
|
min={0}
|
|
max={360}
|
|
valueLabelDisplay="on"
|
|
valueLabelFormat={(value) => `hsl(${value} 100% 50%)`}
|
|
onChange={(event, newValue) => setHue(newValue)}
|
|
/>
|
|
<ButtonGroup
|
|
variant="plain"
|
|
aria-label="button group"
|
|
sx={{ '--ButtonGroup-separatorColor': `hsl(${hue} 100% 50%) !important` }}
|
|
>
|
|
<Button>One</Button>
|
|
<Button>Two</Button>
|
|
<Button>Three</Button>
|
|
<IconButton>
|
|
<Settings />
|
|
</IconButton>
|
|
</ButtonGroup>
|
|
</Box>
|
|
);
|
|
}
|