Skip to content

Commit

Permalink
fix: move property type definitions, as private, to their functional …
Browse files Browse the repository at this point in the history
…components
  • Loading branch information
klown committed Dec 20, 2023
1 parent cabf34d commit 352ce6c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
8 changes: 7 additions & 1 deletion src/ActionBmwCodeCell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,16 @@
*/

import { html } from "htm/preact";
import { ActionBmwCodeCellPropsType } from "./index.d";
import { OptionsType } from "./index.d";
import { BlissSymbol } from "./BlissSymbol";
import "./ActionBmwCodeCell.scss";


type ActionBmwCodeCellPropsType = {
id: string,
options: OptionsType
};

export function ActionBmwCodeCell (props: ActionBmwCodeCellPropsType) {
const {
columnStart, columnSpan, rowStart, rowSpan, bciAvId, label
Expand Down
4 changes: 2 additions & 2 deletions src/BlissSymbol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { BciAvIdType } from "./index.d";

export const GRAPHIC_ROLE = "graphic-symbol img";

type BlissSymbolProps = {
type BlissSymbolPropsType = {
bciAvId: BciAvIdType,
label: string,
// Aria markup information for svg part of the BlissSymbol. The first is
Expand All @@ -26,7 +26,7 @@ type BlissSymbolProps = {
labelledBy?: string
}

export function BlissSymbol (props: BlissSymbolProps) {
export function BlissSymbol (props: BlissSymbolPropsType) {
const { bciAvId, label, isPresentation, labelledBy } = props;
const svgElement = getSvgElement(bciAvId);

Expand Down
6 changes: 5 additions & 1 deletion src/Palette.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@
*/

import { html } from "htm/preact";
import { PalettePropsType } from "./index.d";
import { JsonPaletteType } from "./index.d";
import { cellTypeRegistry } from "./GlobalData";
import "./Palette.scss";

type PalettePropsType = {
json: JsonPaletteType
};

/**
* Given a palette defined in a json structure, compute the number of rows
* and columns in that palette.
Expand Down
11 changes: 0 additions & 11 deletions src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,3 @@ export type JsonPaletteType = {
}
}
};

// Types associated with the `props` parameter of the component functions.

export type PalettePropsType = {
json: JsonPaletteType
};

export type ActionBmwCodeCellPropsType = {
id: string,
options: OptionsType
};

0 comments on commit 352ce6c

Please sign in to comment.