Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit 0ee1639

Browse files
committed
Wrap max button into its own component
1 parent 4be4176 commit 0ee1639

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

src/component/button.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,4 +523,39 @@ RadioButton.propTypes = {
523523
selected: PropTypes.bool.isRequired,
524524
};
525525

526+
//
527+
// Max Button
528+
//
529+
530+
const maxStyles = StyleSheet.create({
531+
touchable: {
532+
borderStyle: 'solid',
533+
borderWidth: 1,
534+
minHeight: 0,
535+
minWidth: 0,
536+
height: 30,
537+
width: 50,
538+
},
539+
});
540+
541+
export const MaxButton = ({ active, style, ...props }) => (
542+
<Button
543+
style={[
544+
{ borderColor: active ? color.blackText : color.greyPlaceholder },
545+
maxStyles.touchable,
546+
style,
547+
]}
548+
{...props}
549+
>
550+
<Text style={{ color: active ? color.blackText : color.greyPlaceholder }}>
551+
Max
552+
</Text>
553+
</Button>
554+
);
555+
556+
MaxButton.propTypes = {
557+
active: PropTypes.bool.isRequired,
558+
style: ViewPropTypes.style,
559+
};
560+
526561
export default Button;

0 commit comments

Comments
 (0)