smooth-shadows
Version:
A library to generate smooth shadows with multiple layers
41 lines (40 loc) • 1.56 kB
TypeScript
import { CubicBezier, Easing } from './easings';
export declare type CSSLength = string | 0;
export declare type CSSColorRGBA = [number, number, number, number];
export declare type SmoothShadowsArray = [CSSLength, CSSLength, CSSLength, CSSLength, CSSColorRGBA];
export declare type SmoothShadowsObject = {
x: CSSLength;
y: CSSLength;
blur: CSSLength;
spread: CSSLength;
color: {
red: number;
green: number;
blue: number;
alpha: number;
};
};
export declare type SmoothShadowsCSS = string;
export declare type LayersOption = number;
export declare type EasingsOption = Partial<{
offset: Easing['name'] | CubicBezier;
blur: Easing['name'] | CubicBezier;
alpha: Easing['name'] | CubicBezier;
}>;
export declare type OutputOption = 'array' | 'object' | 'css';
declare function smoothShadows(x: CSSLength, y: CSSLength, blur: CSSLength, spread: CSSLength, color: CSSColorRGBA, options?: Partial<{
layers: LayersOption;
easings: EasingsOption;
output: 'array';
}>): SmoothShadowsArray[];
declare function smoothShadows(x: CSSLength, y: CSSLength, blur: CSSLength, spread: CSSLength, color: CSSColorRGBA, options?: Partial<{
layers: LayersOption;
easings: EasingsOption;
output: 'object';
}>): SmoothShadowsObject[];
declare function smoothShadows(x: CSSLength, y: CSSLength, blur: CSSLength, spread: CSSLength, color: CSSColorRGBA, options?: Partial<{
layers: LayersOption;
easings: EasingsOption;
output: 'css';
}>): SmoothShadowsCSS;
export { smoothShadows };