MCPcopy Create free account
hub / github.com/fontsource/fontsource / SliderButton

Function SliderButton

website/app/components/preview/Buttons.tsx:38–77  ·  view source on GitHub ↗
({
	label,
	icon,
	value,
	setValue,
	suffix,
	defaultValue,
	min,
	max,
}: SliderButtonProps)

Source from the content-addressed store, hash-verified

36}
37
38export const SliderButton = ({
39 label,
40 icon,
41 value,
42 setValue,
43 suffix,
44 defaultValue,
45 min,
46 max,
47}: SliderButtonProps) => {
48 return (
49 <Popover width={200} position="bottom" withArrow shadow="md">
50 <Popover.Target>
51 <Tooltip label={label} openDelay={600} closeDelay={100}>
52 <Button className={classes.button}>
53 <Group>
54 {icon}
55 <Text>
56 {value}
57 {suffix}
58 </Text>
59 </Group>
60 </Button>
61 </Tooltip>
62 </Popover.Target>
63 <Popover.Dropdown>
64 <MantineSlider
65 color="purple.0"
66 size="sm"
67 label={null}
68 value={value}
69 onChange={setValue}
70 defaultValue={defaultValue}
71 min={min}
72 max={max}
73 />
74 </Popover.Dropdown>
75 </Popover>
76 );
77};
78
79const NormalButtonsGroup = observer(
80 ({ state$, subsets, hasItalic, defSubset }: ButtonsProps) => {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected