onChange(option.value)}
- className={cn(
- 'font-bold cursor-pointer relative bg-background items-center justify-center flex',
- getRoundedClasses(index, options.length, size),
- size === 'md' && 'text-sm px-3 h-8',
- size === 'lg' && 'px-4 h-10',
- value !== option.value && 'text-light-grey',
- grow && 'grow',
- )}
- >
- {value === option.value && (
-
- )}
-
-
- {option.label}
-
-
- {/**
- * Render the label again underneath the absolute-positioned label,
- * since the absolute-positioned label has no effect on layout.
- */}
-
- {option.label}
-
-