Skip to content

Commit

Permalink
Merge 8681197 into 48609e8
Browse files Browse the repository at this point in the history
  • Loading branch information
sumj25 committed Jan 31, 2022
2 parents 48609e8 + 8681197 commit d069ad5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions example/src/views/fab.tsx
Expand Up @@ -41,6 +41,7 @@ export default () => {
title="Navigate"
upperCase
icon={{ name: 'place', color: 'white' }}
size="small"
/>

<Text style={{ color: '#397af8', paddingVertical: 10 }}>Disabled</Text>
Expand Down
8 changes: 7 additions & 1 deletion packages/base/src/FAB/FAB.tsx
Expand Up @@ -73,7 +73,9 @@ export const FAB: RneFunctionComponent<FABProps> = ({
<Button
buttonStyle={StyleSheet.flatten([
rest.title
? styles.extendedLabel
? size === 'small'
? styles.smallExtendedLabel
: styles.extendedLabel
: size === 'small'
? styles.smallFAB
: styles.largeFAB,
Expand Down Expand Up @@ -140,6 +142,10 @@ const styles = StyleSheet.create({
height: 48,
paddingHorizontal: 16,
},
smallExtendedLabel: {
height: 40,
paddingHorizontal: 12,
},
disabled: {
elevation: 0,
},
Expand Down
2 changes: 1 addition & 1 deletion packages/base/src/FAB/__tests__/FAB.test.tsx
Expand Up @@ -22,7 +22,7 @@ describe('FAB Component', () => {
);
expect(queryByText('test')).toBeTruthy();
expect(wrapper.findAllByType(View)[1].props.style).toMatchObject({
height: 48,
height: 40,
});
});

Expand Down
Expand Up @@ -68,10 +68,10 @@ exports[`FAB Component should match snapshot 1`] = `
"borderRadius": 3,
"borderWidth": 0,
"flexDirection": "row",
"height": 48,
"height": 40,
"justifyContent": "center",
"padding": 8,
"paddingHorizontal": 16,
"paddingHorizontal": 12,
}
}
>
Expand Down

0 comments on commit d069ad5

Please sign in to comment.