From 2b14f7b605c680a71dd3d2b5382afa092be077c8 Mon Sep 17 00:00:00 2001 From: ronreg-ribdev <56719257+ronreg-ribdev@users.noreply.github.com> Date: Mon, 1 Jun 2020 04:12:36 -0700 Subject: [PATCH] StationPicker --- src/js/components/root.js | 50 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/src/js/components/root.js b/src/js/components/root.js index 47792e1..88add5f 100644 --- a/src/js/components/root.js +++ b/src/js/components/root.js @@ -37,6 +37,50 @@ class ElevatorWidget extends Component { } } +// cf. https://github.com/urbit/urbit/blob/0c57e65b3871f1c40f1ecaf784722d4595c0d0ea/pkg/interface/chat/src/js/components/lib/ship-search.js +class StationPicker extends Component { + constructor(props) { + super(props); + this.state = { + searchTerm: "" + }; + this.search = this.search.bind(this); + } + + search(evt) { + this.setState({searchTerm: evt.target.value}); + } + + render() { + const props = this.props; + const state = this.state; + + return ( +
+ {props.from ? "From: " : "To: "} +