Browse Source

Changed DeviceView structure

update-deps
Alex Mikhalev 7 years ago
parent
commit
59f24170ee
  1. 5
      app/components/App.tsx
  2. 7
      app/components/DevicesView.tsx
  3. 8
      app/components/MessagesView.tsx
  4. 1
      app/components/SectionRunnerView.tsx

5
app/components/App.tsx

@ -1,7 +1,6 @@
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import DevTools from "mobx-react-devtools"; import DevTools from "mobx-react-devtools";
import * as React from "react"; import * as React from "react";
import { Item } from "semantic-ui-react";
import { DevicesView, MessagesView } from "@app/components"; import { DevicesView, MessagesView } from "@app/components";
@ -12,11 +11,11 @@ import "semantic-ui-css/semantic.css";
class App extends React.Component { class App extends React.Component {
render() { render() {
return ( return (
<Item.Group divided> <div>
<MessagesView /> <MessagesView />
<DevicesView /> <DevicesView />
<DevTools /> <DevTools />
</Item.Group> </div>
); );
} }
} }

7
app/components/DevicesView.tsx

@ -1,11 +1,16 @@
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import * as React from "react"; import * as React from "react";
import { Item } from "semantic-ui-react";
import DeviceView from "@app/components/DeviceView"; import DeviceView from "@app/components/DeviceView";
class DevicesView extends React.Component { class DevicesView extends React.Component {
render() { render() {
return <DeviceView deviceId="grinklers" />; return (
<Item.Group divided>
<DeviceView deviceId="grinklers" />
</Item.Group>
);
} }
} }

8
app/components/MessagesView.tsx

@ -37,11 +37,9 @@ class MessagesView extends React.Component<{ state: State }> {
<MessageView key={message.id} uiStore={uiStore} message={message} index={index} /> <MessageView key={message.id} uiStore={uiStore} message={message} index={index} />
)); ));
return ( return (
<div className="messages" > <TransitionGroup className="messages" animation="scale" duration={200}>
<TransitionGroup animation="scale" duration={200}> {messages}
{messages} </TransitionGroup>
</TransitionGroup>
</div>
); );
} }
} }

1
app/components/SectionRunnerView.tsx

@ -10,6 +10,7 @@ export default class SectionRunnerView extends React.Component<{ sectionRunner:
return ( return (
<Segment> <Segment>
<h4>Section Runner Queue</h4> <h4>Section Runner Queue</h4>
{this.props.sectionRunner.toString()}
</Segment> </Segment>
); );
} }

Loading…
Cancel
Save