chore: add comments for types and constants
This commit is contained in:
@@ -1,13 +1,22 @@
|
|||||||
|
/**
|
||||||
|
* Font size constants
|
||||||
|
*/
|
||||||
export const DEFAULT_FONT_SIZE = 16;
|
export const DEFAULT_FONT_SIZE = 16;
|
||||||
export const MIN_FONT_SIZE = 8;
|
export const MIN_FONT_SIZE = 8;
|
||||||
export const MAX_FONT_SIZE = 100;
|
export const MAX_FONT_SIZE = 100;
|
||||||
export const FONT_SIZE_STEP = 1;
|
export const FONT_SIZE_STEP = 1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Font weight constants
|
||||||
|
*/
|
||||||
export const DEFAULT_FONT_WEIGHT = 400;
|
export const DEFAULT_FONT_WEIGHT = 400;
|
||||||
export const MIN_FONT_WEIGHT = 100;
|
export const MIN_FONT_WEIGHT = 100;
|
||||||
export const MAX_FONT_WEIGHT = 900;
|
export const MAX_FONT_WEIGHT = 900;
|
||||||
export const FONT_WEIGHT_STEP = 100;
|
export const FONT_WEIGHT_STEP = 100;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Line height constants
|
||||||
|
*/
|
||||||
export const DEFAULT_LINE_HEIGHT = 1.5;
|
export const DEFAULT_LINE_HEIGHT = 1.5;
|
||||||
export const MIN_LINE_HEIGHT = 1;
|
export const MIN_LINE_HEIGHT = 1;
|
||||||
export const MAX_LINE_HEIGHT = 2;
|
export const MAX_LINE_HEIGHT = 2;
|
||||||
|
|||||||
@@ -4,16 +4,40 @@ import {
|
|||||||
} from '$shared/lib/utils';
|
} from '$shared/lib/utils';
|
||||||
|
|
||||||
export interface ControlDataModel {
|
export interface ControlDataModel {
|
||||||
|
/**
|
||||||
|
* Control value
|
||||||
|
*/
|
||||||
value: number;
|
value: number;
|
||||||
|
/**
|
||||||
|
* Minimal possible value
|
||||||
|
*/
|
||||||
min: number;
|
min: number;
|
||||||
|
/**
|
||||||
|
* Maximal possible value
|
||||||
|
*/
|
||||||
max: number;
|
max: number;
|
||||||
|
/**
|
||||||
|
* Step size for increase/decrease
|
||||||
|
*/
|
||||||
step: number;
|
step: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ControlModel extends ControlDataModel {
|
export interface ControlModel extends ControlDataModel {
|
||||||
|
/**
|
||||||
|
* Control identifier
|
||||||
|
*/
|
||||||
id: string;
|
id: string;
|
||||||
|
/**
|
||||||
|
* Area label for increase button
|
||||||
|
*/
|
||||||
increaseLabel: string;
|
increaseLabel: string;
|
||||||
|
/**
|
||||||
|
* Area label for decrease button
|
||||||
|
*/
|
||||||
decreaseLabel: string;
|
decreaseLabel: string;
|
||||||
|
/**
|
||||||
|
* Control area label
|
||||||
|
*/
|
||||||
controlLabel: string;
|
controlLabel: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user