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