- {intl.formatMessage(messages.detailsTabUsageTitle)}
+
- This will show the courses that use this component.
+
- {intl.formatMessage(messages.detailsTabHistoryTitle)}
+
-
+
diff --git a/src/library-authoring/component-info/messages.ts b/src/library-authoring/component-info/messages.ts
index f7d7d0dab6..5be6ba1346 100644
--- a/src/library-authoring/component-info/messages.ts
+++ b/src/library-authoring/component-info/messages.ts
@@ -106,6 +106,11 @@ const messages = defineMessages({
defaultMessage: 'Component Usage',
description: 'Title for the Component Usage container in the details tab',
},
+ detailsTabUsagePlaceholder: {
+ id: 'course-authoring.library-authoring.component.details-tab.usage-placeholder',
+ defaultMessage: 'This will show the courses that use this component. Feature coming soon.',
+ description: 'Explanation/placeholder for the future "Component Usage" feature',
+ },
detailsTabHistoryTitle: {
id: 'course-authoring.library-authoring.component.details-tab.history-title',
defaultMessage: 'Component History',
diff --git a/src/library-authoring/components/ComponentCard.tsx b/src/library-authoring/components/ComponentCard.tsx
index 5dd56381a4..03b6b3aaa9 100644
--- a/src/library-authoring/components/ComponentCard.tsx
+++ b/src/library-authoring/components/ComponentCard.tsx
@@ -6,6 +6,7 @@ import {
Dropdown,
Icon,
IconButton,
+ useToggle,
} from '@openedx/paragon';
import { AddCircleOutline, MoreVert } from '@openedx/paragon/icons';
@@ -18,6 +19,7 @@ import { useRemoveComponentsFromCollection } from '../data/apiHooks';
import BaseComponentCard from './BaseComponentCard';
import { canEditComponent } from './ComponentEditorModal';
import messages from './messages';
+import ComponentDeleter from './ComponentDeleter';
type ComponentCardProps = {
contentHit: ContentHit,
@@ -37,6 +39,8 @@ export const ComponentMenu = ({ usageKey }: { usageKey: string }) => {
const { showToast } = useContext(ToastContext);
const [clipboardBroadcastChannel] = useState(() => new BroadcastChannel(STUDIO_CLIPBOARD_CHANNEL));
const removeComponentsMutation = useRemoveComponentsFromCollection(libraryId, collectionId);
+ const [isConfirmingDelete, confirmDelete, cancelDelete] = useToggle(false);
+
const updateClipboardClick = () => {
updateClipboard(usageKey)
.then((clipboardData) => {
@@ -76,6 +80,9 @@ export const ComponentMenu = ({ usageKey }: { usageKey: string }) => {