7.5.2.64. useAnnotationsModal
提供回调来启动用于编辑 Kubernetes 资源注解的模态的 hook。
Example
const PodAnnotationsButton = ({ pod }) => {
const { t } = useTranslation();
const launchAnnotationsModal = useAnnotationsModal<PodKind>(pod);
return <button onClick={launchAnnotationsModal}>{t('Edit Pod Annotations')}</button>
}
| 参数名称 | 描述 |
|---|---|
|
| 用于编辑 K8sResourceCommon 类型的对象的注解的资源。 |
返回
启动一个模态来编辑资源注解的功能。