File size: 782 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
import { Dispatch, SetStateAction } from 'react'
import { ActionJSON, RecordJSON, ResourceJSON } from '../../interfaces/index.js'
/**
* Props which are passed to all action components
* @alias ActionProps
* @memberof BaseActionComponent
*/
export type ActionProps = {
/**
* Action object describing the action
*/
action: ActionJSON;
/**
* Object of type: {@link ResourceJSON}
*/
resource: ResourceJSON;
/**
* Selected record. Passed for actions with "record" actionType
*/
record?: RecordJSON;
/**
* Selected records. Passed for actions with "bulk" actionType
*/
records?: Array<RecordJSON>;
/**
* Sets tag in a header of an action. It is a function taking tag as an argument
*/
setTag?: Dispatch<SetStateAction<string>>;
}
|