-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathFooterButton.js
43 lines (39 loc) · 1.17 KB
/
FooterButton.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import React from 'react'
import SuperButton from './SuperButton'
import PropTypes from 'prop-types'
import Footer from './Footer'
import { Metrics } from './Themes'
const FooterButton = ({ size, leftIcon, rightIcon, label, labelStyle, uppercase, active, disabled, backgroundColor, activityIndicatorColor, onPress }) => (
<Footer height={Metrics.buttons[size]}>
<SuperButton
size={size}
label={label}
active={active}
disabled={disabled}
onPress={onPress}
leftIcon={leftIcon}
rightIcon={rightIcon}
uppercase={uppercase}
labelStyle={labelStyle}
backgroundColor={backgroundColor}
activityIndicatorColor={activityIndicatorColor}
/>
</Footer>
)
FooterButton.defaultProps = {
size: 'normal',
label: 'Footer button'
}
FooterButton.propTypes = {
size: PropTypes.oneOf(['tiny', 'normal', 'large']),
active: PropTypes.bool,
disabled: PropTypes.bool,
label: PropTypes.string,
uppercase: PropTypes.bool,
leftIcon: PropTypes.element,
rightIcon: PropTypes.element,
backgroundColor: PropTypes.string,
activityIndicatorColor: PropTypes.string,
onPress: PropTypes.func.isRequired
}
export default FooterButton