fleet/frontend/interfaces/form_field.ts
Jacob Shandling 7af4f3a432
Define new Query interfaces for queries with scheduling features (#12676)
## Addresses #7765
### Define front end interfaces for interacting with the [updated API
specs for merging scheduling functionality into the Queries
page](https://github.com/fleetdm/fleet/pull/11742/files), for use by all
frontend work in this story.

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2023-07-12 13:22:56 -07:00

21 lines
428 B
TypeScript

import PropTypes from "prop-types";
export default PropTypes.shape({
error: PropTypes.string,
name: PropTypes.string,
onChange: PropTypes.func,
value: PropTypes.oneOfType([
PropTypes.array,
PropTypes.bool,
PropTypes.number,
PropTypes.string,
]),
});
export interface IFormField<T = any[] | boolean | number | string> {
error: string;
name: string;
onChange: (value: any) => void;
value: T;
}