-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Keep global state of native app connection
- Loading branch information
Showing
11 changed files
with
155 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import styled from "styled-components" | ||
import { PopupRequest } from "../../utils/types" | ||
import { Button } from "../controls/Button" | ||
|
||
export type CommonProps = { | ||
resolve: (value: any) => void | ||
reject: (reason?: any) => void | ||
} & PopupRequest | ||
|
||
export const MessageContainer = styled.div` | ||
position: relative; | ||
min-height: 40px; | ||
padding-right: 56px; | ||
` | ||
|
||
export const ReloadButton = styled(Button)` | ||
position: absolute; | ||
top: 50%; | ||
right: 0; | ||
transform: translateY(-50%); | ||
` | ||
|
||
export const ButtonContainer = styled.div` | ||
display: flex; | ||
position: absolute; | ||
bottom: 12px; | ||
left: 12px; | ||
right: 12px; | ||
` | ||
|
||
export const ButtonSpacer = styled.span` | ||
margin-right: 12px; | ||
` | ||
|
||
export const ButtonMessage = styled.div` | ||
display: flex; | ||
flex-grow: 1; | ||
opacity: 0.5; | ||
` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from "react" | ||
import { NativeParams } from "../../utils/types" | ||
|
||
export class NativeInfo extends React.Component<NativeParams> { | ||
render() { | ||
switch (this.props.state) { | ||
case "outdated": | ||
return ( | ||
<small> | ||
Native <b>outdated</b>: v{this.props.version} | ||
</small> | ||
) | ||
|
||
case "connected": | ||
return <small>Native connected: v{this.props.version}</small> | ||
|
||
default: | ||
return null | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters