summaryrefslogtreecommitdiffhomepage
path: root/app/components/styled/AppButton.js
diff options
context:
space:
mode:
authoranderklander <anderklander@gmail.com>2018-02-15 08:47:11 +0100
committeranderklander <anderklander@gmail.com>2018-02-15 16:02:03 +0100
commit1e9aa9bbeb6be8bd880946a27dc5672b9c668d33 (patch)
treeffc7302aea91b851bfd09c3f02acbe6bbcd725c1 /app/components/styled/AppButton.js
parent86a28e957d2facd1f31daf072644c06de8bb05ee (diff)
downloadmullvadvpn-1e9aa9bbeb6be8bd880946a27dc5672b9c668d33.tar.xz
mullvadvpn-1e9aa9bbeb6be8bd880946a27dc5672b9c668d33.zip
CellButton rework
Diffstat (limited to 'app/components/styled/AppButton.js')
-rw-r--r--app/components/styled/AppButton.js43
1 files changed, 2 insertions, 41 deletions
diff --git a/app/components/styled/AppButton.js b/app/components/styled/AppButton.js
index d57775ef06..3c28e0b760 100644
--- a/app/components/styled/AppButton.js
+++ b/app/components/styled/AppButton.js
@@ -2,6 +2,8 @@
import React from 'react';
import { Text, Component } from 'reactxp';
import { Button } from './Button';
+import { Label } from './Label';
+import { Icon } from './Icon';
import Img from '../Img';
import { colors } from '../../config';
@@ -54,50 +56,9 @@ const styles = {
alignContent: 'center',
justifyContent: 'center',
},
- icon:{
- position: 'absolute',
- width: 7,
- height: 12,
- alignSelf: 'flex-end',
- },
}),
- ...createTextStyles({
- label:{
- alignSelf: 'center',
- fontFamily: 'DINPro',
- fontSize: 20,
- fontWeight: '900',
- lineHeight: 26,
- },
- })
};
-
-export class Label extends Component {
- render() {
- return (
- <Text style={[ styles.label, this.props.style ]}>
- {this.props.children}
- </Text>
- );
- }
-}
-
-export class Icon extends Component {
- render() {
- const width = this.props.width || 7;
- const height = this.props.height || 12;
- const source = this.props.source || 'icon-chevron';
- return (
- <Img style={[ styles.icon,
- {width,
- height},
- this.props.style]}
- source={source}
- tintColor='currentColor'/>);
- }
-}
-
export default class BaseButton extends Component {
props: {
children: React.Element<*>,