Skip to content

Commit

Permalink
fix: update TS declaration file
Browse files Browse the repository at this point in the history
  • Loading branch information
soumyaloka committed Jul 31, 2023
1 parent f776394 commit 0089bfd
Showing 1 changed file with 59 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,73 @@

import lng from '@lightningjs/core';
import Base from '../Base';
import type { StylePartial } from '../../types/lui';
import type { TextBoxStyle } from '../TextBox';
import { StylePartial } from '../../types/lui';
import { TextBoxStyle } from '../TextBox';

export type GridOverlayStyle = {
type GridOverlayStyle = {
propertyTextStyle: TextBoxStyle;
valueTextStyle: TextBoxStyle;
};

export default class GridOverlay extends Base {
declare namespace GridOverlay {
export interface TemplateSpec extends Base.TemplateSpec {
/**
* when set to true, it displays the column span rectangles.
*/
showColumns?: boolean;

/**
* when set to true, it displays the rulers for spacing between columns.
*/
showGutters?: boolean;

/**
* when set to true, it displays the X and Y margin rulers.
*/
showMargins?: boolean;

/**
* when set to true, it displays the X and Y "safe" zone rulers. This represents the area where content should not be rendered to avoid screen clipping on a device.
*/
showSafe?: boolean;

/**
* when set to true, it displays the textbox containing the exact numbers associated with the screen, margin, safe, and gutter sizes.
*/
showText?: boolean;

style?: StylePartial<GridOverlayStyle>;
}
}
declare class GridOverlay<
TemplateSpec extends GridOverlay.TemplateSpec = GridOverlay.TemplateSpec,
TypeConfig extends lng.Component.TypeConfig = lng.Component.TypeConfig
> extends Base<TemplateSpec, TypeConfig> {
/**
* when set to true, it displays the column span rectangles.
*/
showColumns?: boolean;

/**
* when set to true, it displays the rulers for spacing between columns.
*/
showGutters?: boolean;

/**
* when set to true, it displays the X and Y margin rulers.
*/
showMargins?: boolean;

/**
* when set to true, it displays the X and Y "safe" zone rulers. This represents the area where content should not be rendered to avoid screen clipping on a device.
*/
showSafe?: boolean;

/**
* when set to true, it displays the textbox containing the exact numbers associated with the screen, margin, safe, and gutter sizes.
*/
showText?: boolean;

get style(): GridOverlayStyle;
set style(v: StylePartial<GridOverlayStyle>);

Expand Down Expand Up @@ -65,3 +118,5 @@ export default class GridOverlay extends Base {
get _TextScreenH(): lng.Component;
get _TextScreenW(): lng.Component;
}

export { GridOverlay as default, GridOverlayStyle };

0 comments on commit 0089bfd

Please sign in to comment.