fleet/frontend/interfaces/dropdownOption.ts
Jacob Shandling a1f85f8b26
UI – refactor custom dropdown option logic, apply it to the global and team host status webhook settings (#17518)
## Addresses #17496
- Encapsulate logic for generating custom dropdown options
- Apply that logic to the team and global host status webhook settings
forms, as well as the edit query form
- Hide and show global host status webhook setting fields to match the
fresher UX of the team setting

![Screenshot 2024-03-08 at 5 56
39 PM](https://github.com/fleetdm/fleet/assets/61553566/59c618f1-e955-4ee8-abfe-ca9a3a7c7362)

- [x] Changes file added for user-visible changes in `changes/`
- [x] Manual QA for all new/changed functionality

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2024-03-11 11:27:34 -05:00

14 lines
339 B
TypeScript

import PropTypes from "prop-types";
export default PropTypes.shape({
disabled: PropTypes.bool,
label: PropTypes.string,
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
});
export interface IDropdownOption {
disabled?: boolean;
label: string | JSX.Element;
value: string | number;
premiumOnly?: boolean;
}