Skip to content

Commit

Permalink
transform types from interface to type for overlay style
Browse files Browse the repository at this point in the history
  • Loading branch information
csouchet committed May 9, 2023
1 parent be1c17a commit 29651c8
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/component/registry/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,27 +74,27 @@ export type OverlayPosition = OverlayShapePosition | OverlayEdgePosition;
/**
* @category Overlays
*/
export interface OverlayStyle {
export type OverlayStyle = {
font?: OverlayFont;
fill?: OverlayFill;
stroke?: OverlayStroke;
}
};

/**
* The font family is {@link StyleDefault.DEFAULT_FONT_FAMILY}.
* @category Overlays
*/
export interface OverlayFont {
export type OverlayFont = {
/** @default {@link StyleDefault.DEFAULT_OVERLAY_FONT_COLOR} */
color?: string;
/** @default {@link StyleDefault.DEFAULT_OVERLAY_FONT_SIZE} */
size?: number;
}
};

/**
* @category Overlays
*/
export interface OverlayFill {
export type OverlayFill = {
/** @default {@link StyleDefault.DEFAULT_OVERLAY_FILL_COLOR} */
color?: string;
/**
Expand All @@ -104,12 +104,12 @@ export interface OverlayFill {
* @default {@link StyleDefault.DEFAULT_OVERLAY_FILL_OPACITY}
*/
opacity?: number;
}
};

/**
* @category Overlays
*/
export interface OverlayStroke {
export type OverlayStroke = {
/**
* If you don't want to display a stroke, you can set the color to
* * `transparent`
Expand All @@ -123,16 +123,16 @@ export interface OverlayStroke {
* @default {@link StyleDefault.DEFAULT_OVERLAY_STROKE_WIDTH}
*/
width?: number;
}
};

/**
* @category Overlays
*/
export interface Overlay {
export type Overlay = {
position: OverlayPosition;
label?: string;
style?: OverlayStyle;
}
};

/**
* @category Element Style
Expand Down

0 comments on commit 29651c8

Please sign in to comment.