Skip to content

Commit

Permalink
fix(hippy-react): fix declaration for animation and scroll-view
Browse files Browse the repository at this point in the history
  • Loading branch information
tomdyqin committed Sep 13, 2023
1 parent c76ac57 commit 5ff1bc9
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 14 deletions.
36 changes: 23 additions & 13 deletions packages/hippy-react/src/components/scroll-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,29 @@ import Element from '../dom/element-node';
import { isRTL } from '../utils/i18n';
import View from './view';

export interface ScrollViewProps {
interface ScrollViewPropsIOS {

/**
* When `true`, shows a horizontal scroll indicator.
* Default: true
*/
showsHorizontalScrollIndicator?: boolean;

/**
* When `true`, shows a vertical scroll indicator.
* Default: true
*/
showsVerticalScrollIndicator?: boolean;
}

interface ScrollViewPropsAndroid {
/**
* When false, the scroll view will hide scroll indicator
* @default false
*/
showScrollIndicator?: boolean;
}
export interface ScrollViewProps extends ScrollViewPropsAndroid, ScrollViewPropsIOS {
// TODO: allow HippyTypes.Style[]
style?: HippyTypes.Style;
/**
Expand All @@ -52,18 +74,6 @@ export interface ScrollViewProps {
*/
scrollEnabled?: boolean;

/**
* When `true`, shows a horizontal scroll indicator.
* Default: true
*/
showsHorizontalScrollIndicator?: boolean;

/**
* When `true`, shows a vertical scroll indicator.
* Default: true
*/
showsVerticalScrollIndicator?: boolean;

/**
* These styles will be applied to the scroll view content container which wraps all
* of the child views.
Expand Down
2 changes: 1 addition & 1 deletion packages/hippy-react/src/modules/animation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ interface AnimationOptions {
* Value type, leave it blank in most case, except use rotate/color related
* animation, set it to be 'deg' or 'color'.
*/
valueType?: 'deg'; // TODO: fill more options
valueType?: 'deg' | 'rad' | 'color'; // TODO: fill more options

/**
* Animation start position
Expand Down

0 comments on commit 5ff1bc9

Please sign in to comment.