make button text size variable

This commit is contained in:
ammarahm-ed
2020-11-02 20:46:47 +05:00
parent a9a98cfe0d
commit cf97c77d24

View File

@@ -14,6 +14,7 @@ export const Button = ({
title = '',
icon,
color = 'accent',
fontSize=SIZE.sm
}) => {
const [state, dispatch] = useTracked();
const {colors} = state;
@@ -48,7 +49,7 @@ export const Button = ({
/>
) : null}
<Text
style={[styles.buttonText, {color: grayed ? colors.icon : 'white'}]}>
style={[styles.buttonText, {color: grayed ? colors.icon : 'white',fontSize:fontSize}]}>
{title}
</Text>
</PressableButton>
@@ -67,7 +68,6 @@ const styles = StyleSheet.create({
buttonText: {
fontFamily: WEIGHT.medium,
color: 'white',
fontSize: SIZE.sm,
marginLeft: 5,
},
});