@lobehub/ui
Version:
Lobe UI is an open-source UI component library for building AIGC web apps
40 lines (39 loc) • 1.13 kB
TypeScript
import type { CSSProperties } from 'react';
/**
* Create a Base64 encoded SVG mask for smooth corners
* @param options - Configuration options
*/
export declare const createSmoothCornersMask: (options?: {
cornerValue?: number;
size?: number;
}) => string;
/**
* Create a Base64 encoded SVG mask for circle shape
* @param options - Configuration options
*/
export declare const createCircleMask: (options?: {
size?: number;
}) => string;
/**
* Create a Base64 encoded SVG mask for rounded rectangle
* @param options - Configuration options
*/
export declare const createRoundedRectMask: (options?: {
borderRadius?: number;
size?: number;
}) => string;
/**
* Predefined smooth corners masks for common corner values
*/
export declare const SMOOTH_CORNER_MASKS: {
readonly circle: string;
readonly ios: string;
readonly sharp: string;
readonly smooth: string;
readonly square: string;
readonly squircle: string;
};
/**
* CSS helper to apply smooth corners mask
*/
export declare const getSmoothCornersMaskStyle: (cornerType?: keyof typeof SMOOTH_CORNER_MASKS) => CSSProperties;