Skip to content

Commit

Permalink
feat: add canvasStyle property
Browse files Browse the repository at this point in the history
  • Loading branch information
anharu2394 authored and bibixx committed Dec 31, 2022
1 parent f3d78f9 commit 286f490
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/AnimateCC/AnimateCC.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { Props } from './AnimateCC.types';
export const AnimateCC = (props: Props) => {
const {
style: additionalStyles,
canvasStyle: additionalCanvasStyles,
animationName,
composition,
getAnimationObject,
Expand Down Expand Up @@ -51,6 +52,7 @@ export const AnimateCC = (props: Props) => {
display: 'block',
width: '100%',
backgroundColor: color,
...additionalCanvasStyles,
}}
/>
<div
Expand Down
6 changes: 5 additions & 1 deletion src/AnimateCC/AnimateCC.types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { HTMLProps } from 'react';
import { CSSProperties, HTMLProps } from 'react';

import { Properties } from 'types/AdobeAn';

Expand All @@ -22,6 +22,10 @@ export interface Props extends HTMLProps<HTMLDivElement> {
* @description Whether an animation should be paused
*/
paused?: boolean;
/**
* @description Style of a canvas element
*/
canvasStyle?: CSSProperties;
/**
* @description Function called whenever an error is thrown inside the component
*/
Expand Down

0 comments on commit 286f490

Please sign in to comment.