useAnnotationsModal
A hook that provides a callback to launch a modal for editing Kubernetes resource annotations.
Example
const PodAnnotationsButton = ({ pod }) => {
const { t } = useTranslation();
const launchAnnotationsModal = useAnnotationsModal<PodKind>(pod);
return <button onClick={launchAnnotationsModal}>{t('Edit Pod Annotations')}</button>
}
| Parameter Name | Description |
|---|---|
|
The resource to edit annotations for an object of K8sResourceCommon type. |
Returns A function which launches a modal for editing a resource’s annotations.