You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
958 B
JavaScript
55 lines
958 B
JavaScript
"use strict";
|
|
|
|
const React = require("react");
|
|
|
|
const Window = require("../../components/window");
|
|
|
|
// const { Form, Field, Label, TextInput, Section } = require("../components/form");
|
|
|
|
function Form(opts) {
|
|
return opts.children || null;
|
|
}
|
|
|
|
function Field(opts) {
|
|
// MARKER: Use context to tie together labels and text inputs
|
|
return opts.children || null;
|
|
}
|
|
|
|
function Label(opts) {
|
|
return (
|
|
<label>{opts.children}</label>
|
|
);
|
|
}
|
|
|
|
function TextInput(opts) {
|
|
return (
|
|
<input type="text" name={opts.name} />
|
|
);
|
|
}
|
|
|
|
function Section(opts) {
|
|
return opts.children || null;
|
|
}
|
|
|
|
module.exports = function CreateNode() {
|
|
return (
|
|
<div>
|
|
<Window.Title>Create new node</Window.Title>
|
|
<Form method="post">
|
|
<Field required>
|
|
<Label>Name</Label>
|
|
<TextInput name="name" />
|
|
</Field>
|
|
<Field>
|
|
<Label>Type</Label>
|
|
<TextInput name="name" />
|
|
</Field>
|
|
|
|
<Section label="Properties">
|
|
|
|
</Section>
|
|
</Form>
|
|
</div>
|
|
);
|
|
};
|