mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
Extract render target logic out of renderer to be target agnostic
This commit is contained in:
@@ -27,7 +27,10 @@ export type Gradient = {
|
||||
colorStops: Array<ColorStop>
|
||||
};
|
||||
|
||||
export const parseGradient = ({args, method, prefix}: BackgroundSource, bounds: Bounds) => {
|
||||
export const parseGradient = (
|
||||
{args, method, prefix}: BackgroundSource,
|
||||
bounds: Bounds
|
||||
): ?Gradient => {
|
||||
if (method === 'linear-gradient') {
|
||||
return parseLinearGradient(args, bounds);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user