diff options
| -rw-r--r-- | app/components/AppButton.js | 5 | ||||
| -rw-r--r-- | app/components/Cell.js | 10 |
2 files changed, 8 insertions, 7 deletions
diff --git a/app/components/AppButton.js b/app/components/AppButton.js index 7419203472..4ce085af49 100644 --- a/app/components/AppButton.js +++ b/app/components/AppButton.js @@ -3,6 +3,7 @@ import * as React from 'react'; import { Button, Text, Component } from 'reactxp'; import styles from './AppButtonStyles'; import blurStyles from './BlurAppButtonStyles'; +import Img from './Img'; export class Label extends Text {} @@ -32,11 +33,11 @@ class BaseButton extends Component { if (React.isValidElement(node)) { let updatedProps = {}; - if (node.type.name === 'Label') { + if (node.type === Label) { updatedProps = { style: [styles.label, this.textStyle()] }; } - if (node.type.name === 'Img') { + if (node.type === Img) { updatedProps = { tintColor: 'currentColor', style: [styles.icon, this.iconStyle()] }; } diff --git a/app/components/Cell.js b/app/components/Cell.js index 9f0efaab2c..2b3c06a3b1 100644 --- a/app/components/Cell.js +++ b/app/components/Cell.js @@ -2,9 +2,9 @@ import * as React from 'react'; import { Button, Text, Component, Types } from 'reactxp'; -import { colors } from '../config'; - +import Img from './Img'; import { createViewStyles, createTextStyles } from '../lib/styles'; +import { colors } from '../config'; const styles = { ...createViewStyles({ @@ -86,20 +86,20 @@ export class CellButton extends Component<CellButtonProps, State> { if (React.isValidElement(node)) { let updatedProps = {}; - if (node.type.name === 'Label') { + if (node.type === Label) { updatedProps = { style: [styles.label, node.props.style, this.textStyle(node.props.cellHoverStyle)], }; } - if (node.type.name === 'Img') { + if (node.type === Img) { updatedProps = { tintColor: 'currentColor', style: [styles.icon, node.props.style, this.iconStyle(node.props.cellHoverStyle)], }; } - if (node.type.name === 'SubText') { + if (node.type === SubText) { updatedProps = { style: [ styles.subtext, |
