Skip to content

🎥 Make videos programmatically with React

Add icons to Element library actions

JonnyBurgere32e955cf673
diff --git a/packages/studio/src/components/ElementLibrariesSettings.tsx b/packages/studio/src/components/ElementLibrariesSettings.tsx
index 0a3a119a1c..f7f470645a 100644
--- a/packages/studio/src/components/ElementLibrariesSettings.tsx
+++ b/packages/studio/src/components/ElementLibrariesSettings.tsx
@@ -1,7 +1,9 @@
import React, {useCallback, useContext, useState} from 'react';
import {StudioServerConnectionCtx} from '../helpers/client-id';
-import {LIGHT_TEXT, WHITE} from '../helpers/colors';
+import {CURRENT_COLOR, LIGHT_TEXT, WHITE} from '../helpers/colors';
+import {BookIcon} from '../icons/book';
import {BrowseElementsIcon} from '../icons/browse-elements';
+import {LinkIcon} from '../icons/link';
import {TrashIcon} from '../icons/trash';
import {SetSelectedModalContext} from '../state/modals';
import {ActionTooltip} from './ActionTooltip';
@@ -44,6 +46,18 @@ const addLibraryActions: React.CSSProperties = {
padding: '4px 16px',
};
+const addLibraryButtonContent: React.CSSProperties = {
+ alignItems: 'center',
+ display: 'flex',
+ gap: 6,
+};
+
+const addLibraryButtonIcon: React.CSSProperties = {
+ flexShrink: 0,
+ height: 12,
+ width: 12,
+};
+
const libraryRow: React.CSSProperties = {
alignItems: 'center',
display: 'flex',
@@ -287,10 +301,28 @@ export const ElementLibrariesSettings: React.FC = () => {
</div>
<h3 style={addLibraryHeading}>Add new library</h3>
<div style={addLibraryActions}>
- <Button onClick={discoverThirdPartyElements} size="compact">
+ <Button
+ onClick={discoverThirdPartyElements}
+ size="compact"
+ buttonContainerStyle={addLibraryButtonContent}
+ >
+ <BookIcon
+ aria-hidden
+ color={CURRENT_COLOR}
+ style={addLibraryButtonIcon}
+ />
Explore libraries
</Button>
- <Button onClick={() => setIsAddByUrlVisible(true)} size="compact">
+ <Button
+ onClick={() => setIsAddByUrlVisible(true)}
+ size="compact"
+ buttonContainerStyle={addLibraryButtonContent}
+ >
+ <LinkIcon
+ aria-hidden
+ color={CURRENT_COLOR}
+ style={addLibraryButtonIcon}
+ />
Add by URL
</Button>
</div>
diff --git a/packages/studio/src/icons/book.tsx b/packages/studio/src/icons/book.tsx
new file mode 100644
index 0000000000..d45dff1e7a
--- /dev/null
+++ b/packages/studio/src/icons/book.tsx
@@ -0,0 +1,16 @@
+import type {SVGProps} from 'react';
+
+// Font Awesome Pro v7.3.1, Copyright 2026 Fonticons, Inc.
+// https://fontawesome.com/license (Commercial License)
+export const BookIcon: React.FC<
+ SVGProps<SVGSVGElement> & {readonly color: string}
+> = ({color, ...props}) => {
+ return (
+ <svg {...props} xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
+ <path
+ fill={color}
+ d="M0 64C0 28.7 28.7 0 64 0L400 0c26.5 0 48 21.5 48 48l0 320c0 20.9-13.4 38.7-32 45.3l0 66.7 16 0c8.8 0 16 7.2 16 16s-7.2 16-16 16L64 512c-35.3 0-64-28.7-64-64l0 0 0-384zM64 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l320 0 0-64-320 0zM32 392.6c9.4-5.4 20.3-8.6 32-8.6l336 0c8.8 0 16-7.2 16-16l0-320c0-8.8-7.2-16-16-16L64 32C46.3 32 32 46.3 32 64l0 328.6zM144 128l192 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-192 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 96l192 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-192 0c-8.8 0-16-7.2-16-16s7.2-16 16-16z"
+ />
+ </svg>
+ );
+};
diff --git a/packages/studio/src/icons/link.tsx b/packages/studio/src/icons/link.tsx
new file mode 100644
index 0000000000..8115f90a19
--- /dev/null
+++ b/packages/studio/src/icons/link.tsx
@@ -0,0 +1,16 @@
+import type {SVGProps} from 'react';
+
+// Font Awesome Pro v7.3.1, Copyright 2026 Fonticons, Inc.
+// https://fontawesome.com/license (Commercial License)
+export const LinkIcon: React.FC<
+ SVGProps<SVGSVGElement> & {readonly color: string}
+> = ({color, ...props}) => {
+ return (
+ <svg {...props} xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512">
+ <path
+ fill={color}
+ d="M341.1 92.5c8.2 6.9 15.7 14.5 22.6 22.7 19.8-17.4 45.3-27.1 71.8-27.1 59.9 0 108.5 48.6 108.5 108.5 0 28.8-11.4 56.3-31.8 76.7l-79.1 79.1c-20.3 20.3-47.9 31.8-76.7 31.8-59.9 0-108.5-48.6-108.5-108.5 0-15.6 3.4-30.9 9.7-44.9 3.7-8 .1-17.5-7.9-21.2s-17.5-.1-21.2 7.9c-8.2 18.1-12.6 37.9-12.6 58.2 0 77.6 62.9 140.5 140.5 140.5 37.2 0 73-14.8 99.3-41.1l79.1-79.1c26.3-26.3 41.1-62.1 41.1-99.3 0-77.6-62.9-140.5-140.5-140.5-35 0-68.6 13.1-94.4 36.5zM219.5 128c59.9 0 108.5 48.6 108.5 108.5 0 15.6-3.4 30.9-9.7 44.9-3.7 8-.1 17.5 7.9 21.2s17.5 .1 21.2-7.9c8.2-18.1 12.6-37.9 12.6-58.2 0-77.6-62.9-140.5-140.5-140.5-37.2 0-73 14.8-99.3 41.1L41.1 216.2c-26.3 26.3-41.1 62.1-41.1 99.3 0 77.6 62.9 140.5 140.5 140.5 35 0 68.6-13.1 94.4-36.5-8.2-6.9-15.7-14.5-22.6-22.7-19.8 17.4-45.3 27.1-71.8 27.1-59.9 0-108.5-48.6-108.5-108.5 0-28.8 11.4-56.3 31.8-76.7l79.1-79.1c20.3-20.3 47.9-31.8 76.7-31.8z"
+ />
+ </svg>
+ );
+};