Skip to content
Snippets Groups Projects
Verified Commit 23c8c0e5 authored by João Magalhães's avatar João Magalhães :rocket:
Browse files

feat: initial panel split implementation

parent 24c2f05a
No related branches found
No related tags found
1 merge request!8Support for react.js components
Pipeline #1150 passed
...@@ -6,7 +6,8 @@ import { ...@@ -6,7 +6,8 @@ import {
ButtonIncrement, ButtonIncrement,
ButtonSwitch, ButtonSwitch,
Info, Info,
Pair Pair,
Section
} from "./components"; } from "./components";
import "./app.css"; import "./app.css";
...@@ -17,41 +18,47 @@ export const App = () => { ...@@ -17,41 +18,47 @@ export const App = () => {
const onClick = () => setCount(count + 1); const onClick = () => setCount(count + 1);
return ( return (
<> <>
<Button text={getText()} onClick={onClick} /> <Section>
<Button <Button text={getText()} onClick={onClick} />
text={getText()} <Button
image={require("../res/pause.svg")} text={getText()}
imageAlt="tobias" image={require("../res/pause.svg")}
onClick={onClick} imageAlt="tobias"
/> onClick={onClick}
<Info>
<Pair key="tobias" name={"Tobias"} value={`Count ${count}`} />
<Pair key="matias" name={"Matias"} value={"3"} />
<Pair
key="button-tobias"
name={"Button Increment"}
valueNode={
<ButtonIncrement
value={200}
delta={100}
min={0}
suffix={"Hz"}
/>
}
/> />
<Pair <Info>
key="button-cpu" <Pair
name={"Button Switch"} key="tobias"
valueNode={ name={"Tobias"}
<ButtonSwitch value={`Count ${count}`}
options={["NEO", "CLASSIC"]} />
size={"large"} <Pair key="matias" name={"Matias"} value={"3"} />
style={["simple"]} <Pair
onChange={(v) => alert(v)} key="button-tobias"
/> name={"Button Increment"}
} valueNode={
/> <ButtonIncrement
</Info> value={200}
delta={100}
min={0}
suffix={"Hz"}
/>
}
/>
<Pair
key="button-cpu"
name={"Button Switch"}
valueNode={
<ButtonSwitch
options={["NEO", "CLASSIC"]}
size={"large"}
style={["simple"]}
onChange={(v) => alert(v)}
/>
}
/>
</Info>
</Section>
</> </>
); );
}; };
......
...@@ -3,4 +3,5 @@ export * from "./button-increment/button-increment"; ...@@ -3,4 +3,5 @@ export * from "./button-increment/button-increment";
export * from "./button-switch/button-switch"; export * from "./button-switch/button-switch";
export * from "./info/info"; export * from "./info/info";
export * from "./pair/pair"; export * from "./pair/pair";
export * from "./panel-split/panel-split";
export * from "./section/section"; export * from "./section/section";
import React, { FC, ReactNode } from "react";
import "./panel-split.css";
type PanelSplitProps = {
children: ReactNode;
style?: string[];
};
export const PanelSplit: FC<PanelSplitProps> = ({ children, style = [] }) => {
const classes = () => ["panel-split", ...style].join(" ");
return <></>;
};
export default PanelSplit;
.section > .separator {
height: 2px;
background: #ffffff;
margin: 22px 0px 22px 0px;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment