Skip to content

Commit

Permalink
Merge pull request #13117 from rhamilto/OCPBUGS-18306
Browse files Browse the repository at this point in the history
OCPBUGS-18306: fix useDeleteModal Example formatting
  • Loading branch information
openshift-merge-robot committed Sep 1, 2023
2 parents 48a6d12 + 4ba24c0 commit be2d8bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion frontend/packages/console-dynamic-plugin-sdk/docs/api.md
Expand Up @@ -2295,11 +2295,13 @@ A hook that provides a callback to launch a modal for deleting a resource.
### Example


```tsx
const DeletePodButton = ({ pod }) => {
const { t } = useTranslation();
const launchDeleteModal = useDeleteModal(pod);
const launchDeleteModal = useDeleteModal<PodKind>(pod);
return <button onClick={launchDeleteModal}>{t('Delete Pod')}</button>
}
```



Expand Down
Expand Up @@ -823,11 +823,13 @@ export const useAnnotationsModal: UseAnnotationsModal = require('@console/shared
* @param deleteAllResources - (optional) A function to delete all resources of the same kind.
* @returns A function which will launch a modal for deleting a resource.
* @example
* ```tsx
* const DeletePodButton = ({ pod }) => {
* const { t } = useTranslation();
* const launchDeleteModal = useDeleteModal(pod);
* const launchDeleteModal = useDeleteModal<PodKind>(pod);
* return <button onClick={launchDeleteModal}>{t('Delete Pod')}</button>
* }
* ```
*/
export const useDeleteModal: UseDeleteModal = require('@console/shared/src/hooks/useDeleteModal')

Expand Down

0 comments on commit be2d8bf

Please sign in to comment.