fleet/frontend/interfaces/dropdownOption.ts
Gabriel Hernandez 27384c9263
Add UI for uploading custom profiles with target of hosts that include all/exclude any selected labels (#19587)
relates to #18848

This adds the UI that supports uploading a custom profile that applies
to hosts that either:
- have all selected labels
- don't have any of the selected labels

This includes UI updates for the Add Profile modal and the Custom
Targets Modal, as well as code to support the new API.

**include all on add profile modal:**


![image](https://github.com/fleetdm/fleet/assets/1153709/5eb8ffa2-95ce-4f43-ac38-0eac0d678614)

**exclude any on add profile modal:**


![image](https://github.com/fleetdm/fleet/assets/1153709/ec62ad7b-c8bb-45d0-a57f-f078b857dd26)

**dropdown options:**


![image](https://github.com/fleetdm/fleet/assets/1153709/015f268d-9f13-4643-8509-4543fb9a34d8)

**include all custom target modal:**


![image](https://github.com/fleetdm/fleet/assets/1153709/e18b28e0-e20d-4ae1-ad13-15ee757b4818)

**exclude any custom target modal:**


![image](https://github.com/fleetdm/fleet/assets/1153709/9009f584-d07d-4f49-9c74-59c2c36123a3)


<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [ ] Added/updated tests
- [x] Manual QA for all new/changed functionality
2024-06-11 13:23:30 +01:00

17 lines
439 B
TypeScript

import { ReactNode } from "react";
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;
helpText?: ReactNode;
premiumOnly?: boolean;
tooltipContent?: string | JSX.Element;
}