Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCPBUGS-18306: fix useDeleteModal Example formatting #13117

Merged
merged 1 commit into from Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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