Skip to content

Instantly share code, notes, and snippets.

@ilyalesik
Created February 20, 2020 19:12
Show Gist options
  • Save ilyalesik/90f90e7ea481f6a6ee9b98f317016a02 to your computer and use it in GitHub Desktop.
Save ilyalesik/90f90e7ea481f6a6ee9b98f317016a02 to your computer and use it in GitHub Desktop.
Multiple effects at react-figma
import * as React from 'react';
import { Page, Rectangle } from 'react-figma';
export const App = () => {
const effects: Effect[] = [
{
type: 'DROP_SHADOW',
color: {
r: 0,
g: 0,
b: 0,
a: 0.15
},
offset: {
x: 0,
y: 0
},
radius: 4,
visible: true,
blendMode: 'NORMAL'
},
{
type: 'DROP_SHADOW',
color: {
r: 0,
g: 0,
b: 0,
a: 0.29
},
offset: {
x: 0,
y: 2
},
radius: 4,
visible: true,
blendMode: 'NORMAL'
}
];
return (
<Page name="New page" isCurrent>
<Rectangle style={{width: 100, height: 100, backgroundColor: "#ffffff"}} effects={effects} />
</Page>
);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment