mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2025-01-20 06:22:38 -05:00
d3c144e5e9
* color library * fixes * wip * wip * wip * wip * working * improvements * changeset * changeset * changeset & cleaning * changeset & cleaning * improvements * fixes * rebase
19 lines
500 B
TypeScript
19 lines
500 B
TypeScript
import { TypographyStyle } from '@ui/lib/types/shapes/textShape';
|
|
|
|
class UiTextLibraries {
|
|
private libraries: Map<string, TypographyStyle> = new Map();
|
|
|
|
public register(id: string, textStyle: TypographyStyle) {
|
|
this.libraries.set(id, textStyle);
|
|
}
|
|
|
|
public get(id: string): TypographyStyle | undefined {
|
|
return this.libraries.get(id);
|
|
}
|
|
|
|
public all(): TypographyStyle[] {
|
|
return Array.from(this.libraries.values());
|
|
}
|
|
}
|
|
|
|
export const uiTextLibraries = new UiTextLibraries();
|