UNPKG

@logic-pad/core

Version:
36 lines (35 loc) 1.45 kB
import { AnyConfig } from '../config.js'; import GridData from '../grid.js'; import CustomSymbol from './customSymbol.js'; export default class CustomIconSymbol extends CustomSymbol { readonly icon: string; readonly rotation: number; readonly title = "Custom Icon Symbol"; get configExplanation(): string; private static readonly EXAMPLE_GRID; private static readonly CONFIGS; /** * **A custom icon symbol** * * @param description - The description of the symbol. Leave this empty to hide the description. * @param grid - The thumbnail grid of the rule, preferably 5x4 in size. * @param x - The x-coordinate of the symbol. * @param y - The y-coordinate of the symbol. * @param icon - The icon to display. All available icons can be found at https://react-icons.github.io/react-icons/icons/md/ * @param rotation - The rotation of the icon in degrees. */ constructor(description: string, grid: GridData, x: number, y: number, icon: string, rotation?: number); get id(): string; get configs(): readonly AnyConfig[] | null; copyWith({ description, grid, x, y, icon, rotation, }: { description?: string; grid?: GridData; x?: number; y?: number; icon?: string; rotation?: number; }): this; withIcon(icon: string): this; withRotation(rotation: number): this; } export declare const instance: CustomIconSymbol;