-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathVariables.tsx
37 lines (32 loc) · 881 Bytes
/
Variables.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import * as React from 'react';
import styled from 'styled-components';
import { useStore } from '../store';
import GuiWindow from './GuiWindow';
import VariableComponent from './VariableComponent';
const Wrapper = styled.div`
display: grid;
grid-template-columns: 35px 80px auto 70px 70px 70px;
align-items: center;
text-align: center;
margin-bottom: 5px;
`;
interface Props {}
const Variables: React.FC<Props> = () => {
const { variables } = useStore();
return (
<GuiWindow>
<Wrapper>
<div>Var</div>
<div>Value</div>
<p style={{ fontSize: '17.5px', padding: 0, margin: 0 }}>Variables</p>
<div>Min</div>
<div>Max</div>
<div>Step</div>
</Wrapper>
{variables.map((myVar) => (
<VariableComponent key={myVar.id} {...myVar} />
))}
</GuiWindow>
);
};
export default Variables;