Completely rewrite the UI Components
to a new functional way of defining them with advantages towards generating docs and a potential editor functionality
This commit is contained in:
parent
62ad9db5f0
commit
0a027fd7c2
14 changed files with 461 additions and 371 deletions
23
src/components/UiItems/Section.js
Normal file
23
src/components/UiItems/Section.js
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
// @flow
|
||||
import React from "react";
|
||||
import createComponent from "./base";
|
||||
|
||||
import type { UISection } from "config/flowtypes";
|
||||
|
||||
import ListSubheader from "@material-ui/core/ListSubheader";
|
||||
|
||||
const BaseComponent = (_b, item: UISection, _state, _changeState) => (
|
||||
<ListSubheader>{item.text}</ListSubheader>
|
||||
);
|
||||
|
||||
export default createComponent({
|
||||
id: "section",
|
||||
name: "Section",
|
||||
desc: `
|
||||
The section is a divider that can visually group components.
|
||||
`,
|
||||
parameters: {
|
||||
text: "The text that is being displayed"
|
||||
},
|
||||
baseComponent: BaseComponent
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue