Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file removed src/Buttons/Button.js
Empty file.
6 changes: 3 additions & 3 deletions src/Buttons/PrimaryButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

import React, { Component } from 'react'
import type { Node } from 'react-native'
import { Text as RNText, StyleSheet, TouchableHighlight, View } from 'react-native'
import { Text as RNText, TouchableHighlight, View } from 'react-native'

import { rawStyles, styles } from './style.js'

export type TextProps = {
children: Node,
style?: StyleSheet.Styles
style?: Object
}
class Text extends Component<TextProps> {
render () {
Expand All @@ -28,7 +28,7 @@ class Text extends Component<TextProps> {

export type Props = {
children: Node,
style?: StyleSheet.Styles,
style?: Object,
onPress: () => void
}
export class PrimaryButton extends Component<Props> {
Expand Down
6 changes: 3 additions & 3 deletions src/Buttons/SecondaryButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

import React, { Component } from 'react'
import type { Node } from 'react-native'
import { Text as RNText, StyleSheet, TouchableHighlight, View } from 'react-native'
import { Text as RNText, TouchableHighlight, View } from 'react-native'

import { rawStyles, styles } from './style.js'

export type TextProps = {
children: Node,
style?: StyleSheet.Styles
style?: Object
}
class Text extends Component<TextProps> {
render () {
Expand All @@ -28,7 +28,7 @@ class Text extends Component<TextProps> {

export type Props = {
children: Node,
style?: StyleSheet.Styles,
style?: Object,
onPress: () => void
}
export class SecondaryButton extends Component<Props> {
Expand Down
6 changes: 3 additions & 3 deletions src/Buttons/TertiaryButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

import React, { Component } from 'react'
import type { Node } from 'react-native'
import { Text as RNText, StyleSheet, TouchableHighlight, View } from 'react-native'
import { Text as RNText, TouchableHighlight, View } from 'react-native'

import { rawStyles, styles } from './style.js'

export type TextProps = {
children: Node,
style?: StyleSheet.Styles
style?: Object
}
class Text extends Component<TextProps> {
render () {
Expand All @@ -28,7 +28,7 @@ class Text extends Component<TextProps> {

export type Props = {
children: Node,
style?: StyleSheet.Styles,
style?: Object,
onPress: () => void
}
export class TertiaryButton extends Component<Props> {
Expand Down
7 changes: 0 additions & 7 deletions src/Buttons/index.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/Buttons/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { StyleSheet } from 'react-native'

import THEME from '../edge-theme.js'
import { THEME } from '../edge-theme.js'
import { scale } from '../scaling.js'

export const rawStyles = {
Expand Down
4 changes: 2 additions & 2 deletions src/FormField/FormFieldStyle.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// @flow

import * as Colors from '../constants/Colors'
import { THEME } from '../edge-theme.js'
import { scale } from '../scaling.js'

const InputStyles = {
container: {
position: 'relative',
borderBottomColor: Colors.PRIMARY,
borderBottomColor: THEME.COLORS.PRIMARY,
borderBottomWidth: 1,
width: '100%'
},
Expand Down
5 changes: 0 additions & 5 deletions src/FormField/index.js

This file was deleted.

5 changes: 2 additions & 3 deletions src/Gradient/Gradient.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { Node } from 'react'
import { StyleSheet } from 'react-native'
import LinearGradient from 'react-native-linear-gradient'

import THEME from '../edge-theme.js'
import { THEME } from '../edge-theme.js'

type Coordinates = { x: number, y: number }

Expand All @@ -28,8 +28,7 @@ export type Props = {
colors?: Array<string>,
start?: Coordinates,
end?: Coordinates,
// $FlowFixMe
style?: StyleSheet.Styles
style?: Object
}

export class Gradient extends Component<Props> {
Expand Down
29 changes: 15 additions & 14 deletions src/Modals/InputModal/InputModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@

import React, { Component } from 'react'
import type { Node } from 'react'
import { StyleSheet, Text, View } from 'react-native'
import { Text, View } from 'react-native'

import { PrimaryButton, SecondaryButton } from '../../Buttons'
import { FormField } from '../../FormField'
import { PrimaryButton } from '../../Buttons/PrimaryButton.js'
import { SecondaryButton } from '../../Buttons/SecondaryButton.js'
import { FormField } from '../../FormField/FormField.js'
import { InputAndButtonStyle, MaterialInputStyle } from '../components/styles.js'
import { styles } from '../ModalStyle.js'

// CONTAINER /////////////////////////////////////////////////////////////////////////////
export type ContainerProps = {
children: Node,
style?: StyleSheet.Styles
style?: Object
}
export class Container extends Component<ContainerProps> {
render () {
Expand All @@ -28,7 +29,7 @@ export class Container extends Component<ContainerProps> {
// HEADER /////////////////////////////////////////////////////////////////////////////
export type HeaderProps = {
children: Node,
style?: StyleSheet.Styles
style?: Object
}
export class Header extends Component<HeaderProps> {
render () {
Expand All @@ -51,7 +52,7 @@ export class Header extends Component<HeaderProps> {
https://github.com/facebook/react-native/issues/6802
*/
type AndroidHackSpacerProps = {
style?: StyleSheet.Styles
style?: Object
}
export class AndroidHackSpacer extends Component<AndroidHackSpacerProps> {
render () {
Expand All @@ -62,7 +63,7 @@ export class AndroidHackSpacer extends Component<AndroidHackSpacerProps> {
// ICON /////////////////////////////////////////////////////////////////////////////
export type IconProps = {
children: Node,
style?: StyleSheet.Styles
style?: Object
}
export class Icon extends Component<IconProps> {
static AndroidHackSpacer = AndroidHackSpacer
Expand All @@ -79,7 +80,7 @@ export class Icon extends Component<IconProps> {
// TITLE /////////////////////////////////////////////////////////////////////////////
type TitleProps = {
children: Node,
style?: StyleSheet.Styles
style?: Object
}
export class Title extends Component<TitleProps> {
render () {
Expand All @@ -95,7 +96,7 @@ export class Title extends Component<TitleProps> {
// DESCRIPTION /////////////////////////////////////////////////////////////////////////////
export type DescriptionProps = {
children: Node,
style?: StyleSheet.Styles
style?: Object
}
export class Description extends Component<DescriptionProps> {
render () {
Expand All @@ -111,7 +112,7 @@ export class Description extends Component<DescriptionProps> {
// BODY /////////////////////////////////////////////////////////////////////////////
type BodyProps = {
children: Node,
style?: StyleSheet.Styles
style?: Object
}
export class Body extends Component<BodyProps> {
render () {
Expand All @@ -127,7 +128,7 @@ export class Body extends Component<BodyProps> {
// FOOTER /////////////////////////////////////////////////////////////////////////////
type FooterProps = {
children: Node,
style?: StyleSheet.Styles
style?: Object
}
export class Footer extends Component<FooterProps> {
render () {
Expand All @@ -139,7 +140,7 @@ export class Footer extends Component<FooterProps> {
// Item /////////////////////////////////////////////////////////////////////////////
type ItemProps = {
children: Node,
style?: StyleSheet.Styles
style?: Object
}
export class Item extends Component<ItemProps> {
render () {
Expand All @@ -155,7 +156,7 @@ export class Item extends Component<ItemProps> {
// Row /////////////////////////////////////////////////////////////////////////////
type RowProps = {
children: Node,
style?: StyleSheet.Styles
style?: Object
}
export class Row extends Component<RowProps> {
render () {
Expand All @@ -171,7 +172,7 @@ export class Row extends Component<RowProps> {
// INTERACTIVE_MODAL /////////////////////////////////////////////////////////////////////////////
type InputModalProps = {
isActive?: boolean,
style?: StyleSheet.Styles,
style?: Object,
input: {|
label: string,
autoCorrect?: boolean,
Expand Down
2 changes: 1 addition & 1 deletion src/Modals/ModalStyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { Dimensions, StyleSheet } from 'react-native'

import THEME from '../edge-theme.js'
import { THEME } from '../edge-theme.js'
import { scale } from '../scaling.js'

export const rawStyles = {
Expand Down
37 changes: 22 additions & 15 deletions src/Modals/SecureTextModal/SecureTextModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@

import React, { Component } from 'react'
import type { Node } from 'react'
import { StyleSheet, Text, View } from 'react-native'
import { Text, View } from 'react-native'

import { PrimaryButton, SecondaryButton } from '../../Buttons'
import { FormField } from '../../FormField'
import { PrimaryButton } from '../../Buttons/PrimaryButton.js'
import { SecondaryButton } from '../../Buttons/SecondaryButton.js'
import { FormField } from '../../FormField/FormField.js'
import { InputAndButtonStyle, MaterialInputStyle } from '../components/styles.js'
import { styles } from '../ModalStyle.js'

// CONTAINER /////////////////////////////////////////////////////////////////////////////
export type ContainerProps = {
children: Node,
style?: StyleSheet.Styles
style?: Object
}
export class Container extends Component<ContainerProps> {
render () {
Expand All @@ -28,7 +29,7 @@ export class Container extends Component<ContainerProps> {
// HEADER /////////////////////////////////////////////////////////////////////////////
export type HeaderProps = {
children: Node,
style?: StyleSheet.Styles
style?: Object
}
export class Header extends Component<HeaderProps> {
render () {
Expand All @@ -51,7 +52,7 @@ export class Header extends Component<HeaderProps> {
https://github.com/facebook/react-native/issues/6802
*/
type AndroidHackSpacerProps = {
style?: StyleSheet.Styles
style?: Object
}
export class AndroidHackSpacer extends Component<AndroidHackSpacerProps> {
render () {
Expand All @@ -62,7 +63,7 @@ export class AndroidHackSpacer extends Component<AndroidHackSpacerProps> {
// ICON /////////////////////////////////////////////////////////////////////////////
export type IconProps = {
children: Node,
style?: StyleSheet.Styles
style?: Object
}
export class Icon extends Component<IconProps> {
static AndroidHackSpacer = AndroidHackSpacer
Expand All @@ -79,7 +80,7 @@ export class Icon extends Component<IconProps> {
// TITLE /////////////////////////////////////////////////////////////////////////////
type TitleProps = {
children: Node,
style?: StyleSheet.Styles
style?: Object
}
export class Title extends Component<TitleProps> {
render () {
Expand All @@ -95,7 +96,7 @@ export class Title extends Component<TitleProps> {
// DESCRIPTION /////////////////////////////////////////////////////////////////////////////
export type DescriptionProps = {
children: Node,
style?: StyleSheet.Styles
style?: Object
}
export class Description extends Component<DescriptionProps> {
render () {
Expand All @@ -111,7 +112,7 @@ export class Description extends Component<DescriptionProps> {
// BODY /////////////////////////////////////////////////////////////////////////////
type BodyProps = {
children: Node,
style?: StyleSheet.Styles
style?: Object
}
export class Body extends Component<BodyProps> {
render () {
Expand All @@ -127,7 +128,7 @@ export class Body extends Component<BodyProps> {
// FOOTER /////////////////////////////////////////////////////////////////////////////
type FooterProps = {
children: Node,
style?: StyleSheet.Styles
style?: Object
}
export class Footer extends Component<FooterProps> {
render () {
Expand All @@ -139,7 +140,7 @@ export class Footer extends Component<FooterProps> {
// Item /////////////////////////////////////////////////////////////////////////////
type ItemProps = {
children: Node,
style?: StyleSheet.Styles
style?: Object
}
export class Item extends Component<ItemProps> {
render () {
Expand All @@ -155,7 +156,7 @@ export class Item extends Component<ItemProps> {
// Row /////////////////////////////////////////////////////////////////////////////
type RowProps = {
children: Node,
style?: StyleSheet.Styles
style?: Object
}
export class Row extends Component<RowProps> {
render () {
Expand All @@ -171,7 +172,7 @@ export class Row extends Component<RowProps> {
// INTERACTIVE_MODAL /////////////////////////////////////////////////////////////////////////////
type SecureTextModalProps = {
isActive?: boolean,
style?: StyleSheet.Styles,
style?: Object,
input: {|
label: string,
autoCorrect?: boolean,
Expand Down Expand Up @@ -269,7 +270,13 @@ export class SecureTextModal extends Component<SecureTextModalProps, SecureTextM
{this.props.noButton.title}
</SecondaryButton.Text>
</SecondaryButton>
<PrimaryButton onPress={this.validateInput} style={InputAndButtonStyle.yesButton}>
<PrimaryButton
onPress={
// $FlowFixMe
this.validateInput
}
style={InputAndButtonStyle.yesButton}
>
<PrimaryButton.Text style={InputAndButtonStyle.buttonText}>
{this.props.yesButton.title}
</PrimaryButton.Text>
Expand Down
2 changes: 1 addition & 1 deletion src/Modals/components/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { StyleSheet } from 'react-native'

import THEME from '../../edge-theme.js'
import { THEME } from '../../edge-theme.js'
import { scale } from '../../scaling.js'

export const rawStyles = {
Expand Down
Loading