diff --git a/tns-core-modules/ui/styling/gradient.d.ts b/tns-core-modules/ui/styling/gradient.d.ts new file mode 100644 index 000000000..3dce43c83 --- /dev/null +++ b/tns-core-modules/ui/styling/gradient.d.ts @@ -0,0 +1,21 @@ +/** + * @module "ui/styling/gradient" + */ /** */ + +import { LengthPercentUnit } from "./style-properties"; +import { Color } from "../../color"; +import * as parser from "../../css/parser"; + +export class LinearGradient { + public angle: number; + public colorStops: ColorStop[]; + + public static parse(value: parser.LinearGradient): LinearGradient; + + public static equals(first: LinearGradient, second: LinearGradient): boolean; +} + +export interface ColorStop { + color: Color; + offset?: LengthPercentUnit; +} diff --git a/tns-core-modules/ui/styling/linear-gradient.ts b/tns-core-modules/ui/styling/linear-gradient.ts index ecedacbcb..a1de0b60a 100644 --- a/tns-core-modules/ui/styling/linear-gradient.ts +++ b/tns-core-modules/ui/styling/linear-gradient.ts @@ -1,12 +1,13 @@ import { LengthPercentUnit } from "./style-properties"; -import * as parser from "../../css/parser"; import { Color } from "../../color"; +import { ColorStop } from "./gradient"; +import * as parser from "../../css/parser"; export class LinearGradient { public angle: number; public colorStops: ColorStop[]; - static parse(value: parser.LinearGradient): LinearGradient { + public static parse(value: parser.LinearGradient): LinearGradient { const result = new LinearGradient(); result.angle = value.angle; result.colorStops = value.colors.map(color => { @@ -28,7 +29,7 @@ export class LinearGradient { return result; } - static equals(first: LinearGradient, second: LinearGradient): boolean { + public static equals(first: LinearGradient, second: LinearGradient): boolean { if (!first && !second) { return true; } else if (!first || !second) { @@ -57,8 +58,3 @@ export class LinearGradient { return true; } } - -export interface ColorStop { - color: Color; - offset?: LengthPercentUnit; -} \ No newline at end of file