Skip to content

Commit

Permalink
Should fix #9
Browse files Browse the repository at this point in the history
The view I measured had a maxHeight, so should have never been greater than expected. For some reason, in the simulator I tested with, it was higher by some decimals so I didn’t realize that.
  • Loading branch information
Alessio Cancian committed Sep 1, 2021
1 parent 1357022 commit 7853010
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/ActionSheetCustom.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import BlurView from './BlurView'
import { Platform } from 'react-native'

const WARN_COLOR = '#FF3B30'
const MAX_HEIGHT = Dimensions.get('window').height * 0.8
const MAX_HEIGHT = Math.round(Dimensions.get('window').height * 0.8)

class ActionSheet extends React.Component {
static defaultProps = {
Expand Down Expand Up @@ -189,7 +189,7 @@ class ActionSheet extends React.Component {
iosStyle ? styles.bodyIos : (darkMode ? styles.bodyDark : styles.body),
{
opacity: translateY ? 1 : 0,
maxHeight: MAX_HEIGHT,
maxHeight: MAX_HEIGHT + 1,
transform: [{
translateY: sheetAnim.interpolate({
inputRange: [0, 1],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@alessiocancian/react-native-actionsheet",
"version": "3.0.3",
"version": "3.0.4",
"description": "Cross platform ActionSheet. This component implements a custom ActionSheet and provides the same way to drawing it on the defferent platforms(iOS and Android). Actually, In order to keep the best effect, it still uses the ActionSheetIOS on iOS.",
"main": "lib/index.js",
"types": "lib/ts/index.d.ts",
Expand Down

0 comments on commit 7853010

Please sign in to comment.