🎥 Make videos programmatically with React
Make the element library menu available without third-party libraries
Igor Samokhovetseae64fe25879
diff --git a/packages/studio/src/components/InspectorPanel/ElementLibraryButton.tsx b/packages/studio/src/components/InspectorPanel/ElementLibraryButton.tsxindex 6a24637d00..853f8689a9 100644--- a/packages/studio/src/components/InspectorPanel/ElementLibraryButton.tsx+++ b/packages/studio/src/components/InspectorPanel/ElementLibraryButton.tsx@@ -8,7 +8,6 @@ import type {SegmentedButtonSegment} from '../SegmentedButton';import {SegmentedButton} from '../SegmentedButton';import {useSettings} from '../SettingsContext';import {- InspectorQuickAction,largeInspectorActionIconContainerStyle,largeInspectorActionIconStyle,} from './common';@@ -27,7 +26,7 @@ const elementLibraryDropdownSegmentStyle: React.CSSProperties = {gap: 8,justifyContent: 'flex-start',padding: `0 ${INSPECTOR_PANEL_HORIZONTAL_PADDING - 4}px`,- width: '100%',+ flex: 1,};const elementLibraryDropdownLabelStyle: React.CSSProperties = {@@ -90,8 +89,6 @@ export const ElementLibraryButton: React.FC = () => {buttonId: null,disabled: false,idleColor: LIGHT_TEXT,- leaveLeftSpace: false,- onOpenChange: null,renderContent: (color) => (<><span style={largeInspectorActionIconContainerStyle}>@@ -109,9 +106,11 @@ export const ElementLibraryButton: React.FC = () => {</>),segmentId: 'element-library',- selectedId: null,style: elementLibraryDropdownSegmentStyle,tooltipLabel: null,+ leaveLeftSpace: false,+ onOpenChange: null,+ selectedId: null,type: 'menu',values: [{@@ -152,7 +151,7 @@ export const ElementLibraryButton: React.FC = () => {disabled: false,id: 'manage-element-libraries',keyHint: null,- label: 'Manage...',+ label: 'Add element library...',leftItem: null,onClick: openElementLibrarySettings,quickSwitcherLabel: null,@@ -171,29 +170,10 @@ export const ElementLibraryButton: React.FC = () => {],);- if (elementLibraries.length > 0) {- return (- <SegmentedButton- segments={elementLibraryDropdownSegments}- style={elementLibraryDropdownStyle}- />- );- }-return (- <InspectorQuickAction- disabled={false}- iconContainerStyle={largeInspectorActionIconContainerStyle}- onClick={openElementsLibrary}- renderIcon={(color) => (- <BrowseElementsIcon- color={color}- style={largeInspectorActionIconStyle}- />- )}- aria-label="Browse the Remotion Elements library inside Studio."- >- Browse Elements- </InspectorQuickAction>+ <SegmentedButton+ segments={elementLibraryDropdownSegments}+ style={elementLibraryDropdownStyle}+ />);};