Skip to content

🎥 Make videos programmatically with React

`@remotion/studio`: Use nested boxes for the Unwrap icon

JonnyBurgera7e1474c7cd9
diff --git a/packages/studio/src/components/InspectorPanel/SequenceUnwrapAction.tsx b/packages/studio/src/components/InspectorPanel/SequenceUnwrapAction.tsx
index 1241dc0221..c4cb9aad09 100644
--- a/packages/studio/src/components/InspectorPanel/SequenceUnwrapAction.tsx
+++ b/packages/studio/src/components/InspectorPanel/SequenceUnwrapAction.tsx
@@ -1,6 +1,7 @@
import React, {useCallback, useContext, useEffect, useState} from 'react';
import {Internals} from 'remotion';
import type {SequenceNodePathInfo} from '../../helpers/get-timeline-sequence-sort-key';
+import {UnwrapIcon} from '../../icons/unwrap';
import {showNotification} from '../Notifications/NotificationCenter';
import {unwrapNode} from '../unwrap-node-api';
import {
@@ -69,17 +70,7 @@ export const SequenceUnwrapAction: React.FC<{
iconContainerStyle={largeInspectorActionIconContainerStyle}
aria-label="Unwrap: remove this element and keep its children"
renderIcon={(color) => (
- <svg
- viewBox="0 0 24 24"
- style={largeInspectorActionIconStyle}
- fill="none"
- stroke={color}
- strokeWidth={1.5}
- strokeLinecap="round"
- strokeLinejoin="round"
- >
- <path d="M8 3H3v5m13-5h5v5M3 16v5h5m13-5v5h-5M9 9h6v6H9z" />
- </svg>
+ <UnwrapIcon color={color} style={largeInspectorActionIconStyle} />
)}
>
Unwrap
diff --git a/packages/studio/src/icons/unwrap.tsx b/packages/studio/src/icons/unwrap.tsx
new file mode 100644
index 0000000000..ae82da9d65
--- /dev/null
+++ b/packages/studio/src/icons/unwrap.tsx
@@ -0,0 +1,34 @@
+import type {SVGProps} from 'react';
+import React from 'react';
+
+export const UnwrapIcon: React.FC<
+ SVGProps<SVGSVGElement> & {
+ readonly color: string;
+ }
+> = ({color, ...props}) => {
+ return (
+ <svg {...props} xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
+ <rect
+ x={16}
+ y={48}
+ width={480}
+ height={416}
+ rx={48}
+ fill="none"
+ stroke={color}
+ strokeWidth={32}
+ strokeDasharray="48 40"
+ />
+ <rect
+ x={144}
+ y={160}
+ width={224}
+ height={192}
+ rx={24}
+ fill="none"
+ stroke={color}
+ strokeWidth={32}
+ />
+ </svg>
+ );
+};