@nativescript-community/ui-neumorphiclayout
Version:
Neumorphism-based layout for NativeScript
31 lines (30 loc) • 1.14 kB
TypeScript
import { Color, CssProperty, Style } from '@nativescript/core';
import { Canvas, Paint } from '@nativescript-community/ui-canvas';
import { NeumorphicLayout } from '.';
export declare enum NeumorphicType {
FLAT = "flat",
PRESSED = "pressed",
PRESSED_IN_OUT = "pressed-in-out"
}
export declare const lightShadowColorProperty: CssProperty<Style, any>;
export declare const darkShadowColorProperty: CssProperty<Style, any>;
export declare const neumorphismProperty: CssProperty<Style, any>;
export declare const shadowDistanceProperty: CssProperty<Style, any>;
export declare const shadowRadiusProperty: CssProperty<Style, any>;
export declare class NeumorphicCanvas extends Canvas {
private readonly mViewRef;
private path;
private innerShadowPath;
private paintStroke;
private readonly paintBase;
private readonly paintDark;
private readonly paintLight;
constructor(view: NeumorphicLayout);
manipulateColor(color: Color, factor: number): Color;
getBasePaint(): Paint;
onDraw(): void;
private initPaints;
private initShape;
private _setBackground;
private _setStroke;
}