+
+ This action will cause Trento to stop tracking all the components
+ discovered by the agent in this host, including the host itself and any
+ other component depending on it.
+
+
+
+
+ Clean up
+
+
+ Cancel
+
+
+
+ );
+}
+
+export default DeregistrationModal;
diff --git a/assets/js/components/DeregistrationModal/DeregistrationModal.stories.jsx b/assets/js/components/DeregistrationModal/DeregistrationModal.stories.jsx
new file mode 100644
index 0000000000..468fa76a35
--- /dev/null
+++ b/assets/js/components/DeregistrationModal/DeregistrationModal.stories.jsx
@@ -0,0 +1,70 @@
+import React, { useState } from 'react';
+
+import Button from '@components/Button';
+import DeregistrationModal from '.';
+
+export default {
+ title: 'DeregistrationModal',
+ component: DeregistrationModal,
+ argTypes: {
+ hostname: {
+ type: 'string',
+ description: 'The host name to confirm deregistration of',
+ control: { type: 'text' },
+ },
+ isOpen: {
+ type: 'boolean',
+ description: 'Sets the visibility of the modal',
+ control: false,
+ },
+ onCleanUp: {
+ description: 'Callback function to run when "Clean up" button is clicked',
+ action: 'Deregistration',
+ control: false,
+ },
+ onClose: {
+ description: 'Callback function to run when "Cancel" button is clicked',
+ action: 'Cancel',
+ control: false,
+ },
+ },
+};
+
+function ButtonToOpenModal({ hostname }) {
+ const [open, setOpen] = useState(false);
+ const [deregistered, setDeregistered] = useState(false);
+
+ return (
+ <>
+