Skip to content

Commit

Permalink
refactor: accept only number for grabber props
Browse files Browse the repository at this point in the history
  • Loading branch information
lodev09 committed Apr 8, 2024
1 parent 8dbfd9c commit fab3221
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ Grabber props to be used for android grabber or handle.
| - | - | - | - |
| visible | `boolean` | `true` | Is grabber visible. |
| color | `ColorValue` | `"rgba(73,69,79,0.4)"` | Grabber color according to M3 specs. |
| height | `DimensionValue` | `4` | Grabber height according to M3 specs. |
| width | `DimensionValue` | `32` | Grabber width according to M3 specs. |
| topOffset | `DimensionValue` | `6` | Grabber top position offset. |
| height | `number` | `4` | Grabber height according to M3 specs. |
| width | `number` | `32` | Grabber width according to M3 specs. |
| topOffset | `number` | `6` | Grabber top position offset. |
### `BlurTint`
Expand Down
14 changes: 4 additions & 10 deletions src/TrueSheetGrabber.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import React from 'react'
import {
View,
type ColorValue,
type ViewStyle,
type DimensionValue,
type StyleProp,
} from 'react-native'
import { View, type ColorValue, type ViewStyle, type StyleProp } from 'react-native'

const GRABBER_WRAPPER_HEIGHT = 24
const GRABBER_DEFAULT_HEIGHT = 4
Expand Down Expand Up @@ -37,20 +31,20 @@ export interface TrueSheetGrabberProps {
* Grabber height according to M3 specs.
* @default 4
*/
height?: DimensionValue
height?: number

/**
* Grabber top position offset.
*
* @default 6
*/
topOffset?: DimensionValue
topOffset?: number

/**
* Grabber width according to M3 specs.
* @default 32
*/
width?: DimensionValue
width?: number
}

/**
Expand Down

0 comments on commit fab3221

Please sign in to comment.