Skip to content

Commit

Permalink
Fixed React-17 React.FC issue and resource id reference
Browse files Browse the repository at this point in the history
  • Loading branch information
Morten Barklund committed Nov 2, 2022
1 parent 0167906 commit 1e3577e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
13 changes: 6 additions & 7 deletions packages/elements/src/types/elementDefinition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import type { ElementBox } from '@googleforcreators/units';
/**
* Internal dependencies
*/
import type React from 'react';
import type { Element } from './element';
import type { ElementType } from './elementType';

Expand Down Expand Up @@ -68,12 +67,12 @@ export interface ElementDefinition<E extends Element = Element> {
isMedia?: boolean;
getLayerText: (element: E) => string;
defaultAttributes: Partial<E>;
Edit: React.FC<EditProps<E>>;
Frame: React.FC<FrameProps<E>>;
Output: React.FC<OutputProps<E>>;
LayerIcon: React.FC<LayerIconProps<E>>;
TextContent: React.FC<TextContentProps<E>>;
Display: React.FC<DisplayProps<E>>;
Edit: React.VoidFunctionComponent<EditProps<E>>;
Frame: React.VoidFunctionComponent<FrameProps<E>>;
Output: React.VoidFunctionComponent<OutputProps<E>>;
LayerIcon: React.VoidFunctionComponent<LayerIconProps<E>>;
TextContent: React.VoidFunctionComponent<TextContentProps<E>>;
Display: React.VoidFunctionComponent<DisplayProps<E>>;
canFlip: boolean;
isMaskable: boolean;
isAspectAlwaysLocked: boolean;
Expand Down
4 changes: 2 additions & 2 deletions packages/media/src/types/sequenceResource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
/**
* Internal dependencies
*/
import type { Resource } from './resource';
import type { Resource, ResourceId } from './resource';

/** This is an abstract parent type of both video and gif resources */
export interface SequenceResource extends Resource {
/** The resource's poster. */
poster?: string;
/** The resource's poster ID. */
posterId?: string;
posterId?: ResourceId;
/** Whether the resource has already been optimized. */
isOptimized?: boolean;
}

0 comments on commit 1e3577e

Please sign in to comment.