Skip to content

Commit ffd430d

Browse files
authored
fix: Update add content existing content icons in section/subsection pages (#2224)
1 parent ad62519 commit ffd430d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/library-authoring/add-content/AddContent.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,21 @@ const AddContentView = ({
144144
/>
145145
);
146146

147+
let existingContentIcon = getItemIcon('libraryContent');
148+
149+
if (insideSection) {
150+
existingContentIcon = getItemIcon('subsection');
151+
} else if (insideSubsection) {
152+
existingContentIcon = getItemIcon('unit');
153+
}
154+
147155
const existingContentButton = (
148156
<AddContentButton
149157
key="libraryContent"
150158
contentType={{
151159
name: intl.formatMessage(contentMessages.libraryContentButton),
152160
blockType: 'libraryContent',
161+
icon: existingContentIcon,
153162
}}
154163
onCreateContent={onCreateContent}
155164
/>

0 commit comments

Comments
 (0)