Skip to content

Commit

Permalink
Update Prop type of CardList
Browse files Browse the repository at this point in the history
  • Loading branch information
Sameeha Rahman authored and Sameeha Rahman committed Apr 1, 2019
1 parent f28ec48 commit 3976e00
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/molecules/floatingButton/FloatingButtonItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ class FloatingButtonItem extends Component {
textContainerStyle
} = this.props;

const textItemStyle = {
...styles.text,
color: textColor,
...textStyle
};

if (text) {
return (
<View
Expand All @@ -55,10 +61,7 @@ class FloatingButtonItem extends Component {
textContainerStyle
]}
>
<Text
style={[styles.text, { color: textColor }, textStyle]}
{...textProps}
>
<Text {...textProps} style={textItemStyle}>
{text}
</Text>
</View>
Expand Down
2 changes: 2 additions & 0 deletions src/organisms/CardList.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { Component } from "react";
import { FlatList, View, Platform } from "react-native";
import PropTypes from "prop-types";
import { Card } from "../molecules/cards/Card";
import { deviceVariables } from "../variables/deviceVariables";

Expand Down Expand Up @@ -48,6 +49,7 @@ export class CardList extends Component {
}

CardList.propTypes = {
backgroundColor: PropTypes.string,
...FlatList.propTypes
};

Expand Down

0 comments on commit 3976e00

Please sign in to comment.