Add style
Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com> Co-authored-by: Brandon Farmer <bthesorceror@gmail.com> Co-authored-by: Alex Paxton <thealexpaxton@gmail.com>pull/10616/head
parent
315efc8441
commit
f8ad5a04f6
|
@ -18,9 +18,9 @@ interface Props {
|
||||||
export default class FuncArgs extends PureComponent<Props> {
|
export default class FuncArgs extends PureComponent<Props> {
|
||||||
public render() {
|
public render() {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className="func-args">
|
||||||
{this.props.func.args.map(({key, value}) => (
|
{this.props.func.args.map(({key, value}) => (
|
||||||
<div key={key}>
|
<div className="func-arg" key={key}>
|
||||||
{key} : {value}
|
{key} : {value}
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
|
|
|
@ -14,7 +14,7 @@ export default class FuncNode extends PureComponent<Props, State> {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
this.state = {
|
this.state = {
|
||||||
isOpen: false,
|
isOpen: true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,8 +23,8 @@ export default class FuncNode extends PureComponent<Props, State> {
|
||||||
const {isOpen} = this.state
|
const {isOpen} = this.state
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className="func-node">
|
||||||
<div className="func-node" onClick={this.handleClick}>
|
<div className="func-node--name" onClick={this.handleClick}>
|
||||||
<div>{func.name}</div>
|
<div>{func.name}</div>
|
||||||
</div>
|
</div>
|
||||||
{isOpen && <FuncArgs func={func} />}
|
{isOpen && <FuncArgs func={func} />}
|
||||||
|
|
|
@ -23,7 +23,7 @@ class TimeMachine extends PureComponent<Props> {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div className="func-node-container">
|
<div className="func-nodes-container">
|
||||||
{funcs.map((f, i) => <FuncNode key={i} func={f} />)}
|
{funcs.map((f, i) => <FuncNode key={i} func={f} />)}
|
||||||
<FuncSelector funcs={this.funcNames} onAddNode={onAddNode} />
|
<FuncSelector funcs={this.funcNames} onAddNode={onAddNode} />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,19 +1,40 @@
|
||||||
.func-node-container {
|
.func-nodes-container {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.func-node {
|
.func-node {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.func-node--name {
|
||||||
background: #252b35;
|
background: #252b35;
|
||||||
border-radius: $radius-small;
|
border-radius: $radius-small;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
width: auto;
|
width: auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
|
||||||
color: $ix-text-default;
|
color: $ix-text-default;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
margin: $ix-marg-a;
|
margin-bottom: $ix-marg-a;
|
||||||
font-family: $ix-text-font;
|
font-family: $ix-text-font;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.func-args {
|
||||||
|
background: #252b35;
|
||||||
|
border-radius: $radius-small;
|
||||||
|
padding: 10px;
|
||||||
|
margin-bottom: $ix-marg-a;
|
||||||
|
width: auto;
|
||||||
|
display: flex;
|
||||||
|
align-items: stretch;
|
||||||
|
flex-direction: column;
|
||||||
|
color: $ix-text-default;
|
||||||
|
font-family: $ix-text-font;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.func-arg {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ import TimeMachine from 'src/ifql/components/TimeMachine'
|
||||||
const setup = () => {
|
const setup = () => {
|
||||||
const props = {
|
const props = {
|
||||||
funcs: [],
|
funcs: [],
|
||||||
nodes: [],
|
suggestions: [],
|
||||||
onAddNode: () => {},
|
onAddNode: () => {},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue