graylog2-server
graylog2-server copied to clipboard
Small refactoring for `SegmentedControl` component.
Description
Motivation and Context
This PR contains a small refactoring for the SegmentedControl
component. We are:
- renaming the
handleChange
prop toonChange
to follow our naming convention and we are simplifying the related type. - implementing a generic type for the value options, to avoid the need to use
as
when providing theonChange
function - removing the
Array<string>
for thedata
prop. It is being supported by the mantineSegmentedControl
component, but having a look at theSelect
component, future maintenance will be easier if we allow only one format for these options.
/nocl