UNPKG

scriptable-testlab

Version:

A lightweight, efficient tool designed to manage and update scripts for Scriptable.

83 lines (63 loc) 1.19 kB
import {AbsSFSymbol} from 'scriptable-abstract'; import {MockImage} from '../media/image'; interface SFSymbolState { name: string; image: Image; } const DEFAULT_STATE: SFSymbolState = { name: '', image: new MockImage() as unknown as Image, }; export class MockSFSymbol extends AbsSFSymbol<SFSymbolState> { constructor(name: string) { super({ ...DEFAULT_STATE, name, }); } get name(): string { return this.state.name; } applyFont(_font: Font): this { return this; } applyThinWeight(): this { return this; } applyUltraLightWeight(): this { return this; } applyLightWeight(): this { return this; } applyRegularWeight(): this { return this; } applyMediumWeight(): this { return this; } applySemiboldWeight(): this { return this; } applyBoldWeight(): this { return this; } applyHeavyWeight(): this { return this; } applyBlackWeight(): this { return this; } applySmallSize(): this { return this; } applyMediumSize(): this { return this; } applyLargeSize(): this { return this; } toImage(): Image { return this.state.image; } }