diff --git a/src/elements/Stop.tsx b/src/elements/Stop.tsx index dbdf7271d..0cd502979 100644 --- a/src/elements/Stop.tsx +++ b/src/elements/Stop.tsx @@ -8,10 +8,6 @@ export default class Stop extends Component { props!: StopProps; static displayName = 'Stop'; - static defaultProps = { - stopColor: '#000', - stopOpacity: 1, - }; setNativeProps = () => { const { parent } = this.props; if (parent) { diff --git a/src/lib/extract/extractGradient.ts b/src/lib/extract/extractGradient.ts index ed01d78dd..5b4b051e1 100644 --- a/src/lib/extract/extractGradient.ts +++ b/src/lib/extract/extractGradient.ts @@ -63,7 +63,12 @@ export default function extractGradient( const l = childArray.length; for (let i = 0; i < l; i++) { const { - props: { offset, stopColor, stopOpacity }, + props: { + style, + offset = style && style.offset, + stopColor = (style && style.stopColor) || '#000', + stopOpacity = style && style.stopOpacity, + }, } = childArray[i]; const offsetNumber = percentToFloat(offset || 0); const color = stopColor && extractColor(stopColor);