-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
08a55ab
commit 9b673df
Showing
4 changed files
with
49 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import PropTypes from 'prop-types'; | ||
|
||
const FabPropTypes = { | ||
// Callback to fire on request to toggle the FAB | ||
onPress: PropTypes.func.isRequired, | ||
|
||
// Current state (active or not active) of the component | ||
isActive: PropTypes.bool.isRequired, | ||
}; | ||
|
||
export default FabPropTypes; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React from 'react'; | ||
import { | ||
KeyboardAvoidingView, | ||
} from 'react-native'; | ||
|
||
import FAB from './FAB'; | ||
import fabPropTypes from './fabPropTypes'; | ||
|
||
function Fab({onPress, isActive}) { | ||
return ( | ||
<KeyboardAvoidingView behavior="position"> | ||
<FAB onPress={onPress} isActive={isActive} /> | ||
</KeyboardAvoidingView> | ||
); | ||
} | ||
|
||
Fab.propTypes = fabPropTypes; | ||
export default Fab; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import React from 'react'; | ||
|
||
import FAB from './FAB'; | ||
import fabPropTypes from './fabPropTypes'; | ||
|
||
function Fab({onPress, isActive}) { | ||
return <FAB onPress={onPress} isActive={isActive} />; | ||
} | ||
|
||
Fab.propTypes = fabPropTypes; | ||
export default Fab; |