Added basic category chooser UI

This commit is contained in:
Ajay Ramachandran
2020-04-02 21:26:13 -04:00
parent b6c243236b
commit 6ea87d7cd0
7 changed files with 171 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
import * as React from "react";
import Config from "../config"
import * as CompileConfig from "../../config.json";
import CategorySkipOptionsComponent from "./CategorySkipOptionsComponent";
export interface CategoryChooserProps {
}
export interface CategoryChooserState {
}
class CategoryChooserComponent extends React.Component<CategoryChooserProps, CategoryChooserState> {
constructor(props: CategoryChooserProps) {
super(props);
// Setup state
this.state = {
}
}
render() {
return (
<table id="categoryChooserTable"
className="categoryChooserTable"> <tbody>
{this.getCategorySkipOptions()}
</tbody> </table>
);
}
getCategorySkipOptions(): JSX.Element[] {
let elements: JSX.Element[] = [];
for (const category of CompileConfig.categoryList) {
elements.push(
<CategorySkipOptionsComponent category={category}
defaultColor={"00d400"}>
</CategorySkipOptionsComponent>
);
}
return elements;
}
}
export default CategoryChooserComponent;