Skip to content

Commit fb1ea98

Browse files
troZeeferrannp
authored andcommitted
docs: add showPageIndicator to docs (#80)
1 parent 9736694 commit fb1ea98

File tree

4 files changed

+10
-0
lines changed

4 files changed

+10
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ const styles = StyleSheet.create({
124124
|`keyboardDismissMode: ('none' / 'on-drag')`| Determines whether the keyboard gets dismissed in response to a drag|both
125125
|`orientation: Orientation`|Set `horizontal` or `vertical` scrolling orientation|iOS
126126
|`transitionStyle: TransitionStyle`|Use `scroll` or `curl` to change transition style|iOS
127+
|`showPageIndicator: boolean`|Shows the dots indicator at the bottom of the view|iOS
127128

128129
## Preview
129130

example/ViewPagerExample.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ export default class ViewPagerExample extends React.Component<*, State> {
125125
orientation="horizontal"
126126
// Lib does not support dynamically transitionStyle change
127127
transitionStyle="scroll"
128+
showPageIndicator
128129
ref={this.viewPager}>
129130
{pages.map(page => this.renderPage(page))}
130131
</ViewPager>

js/types.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,5 @@ export type ViewPagerProps = $ReadOnly<{|
100100
*/
101101
orientation?: Orientation,
102102
transitionStyle?: TransitionStyle,
103+
showPageIndicator?: boolean,
103104
|}>;

typings/index.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ export interface ViewPagerProps extends ReactNative.ViewProps {
6464
* edge-to-edge.
6565
*/
6666
pageMargin?: number;
67+
68+
/**
69+
* iOS only
70+
*/
71+
orientation?: 'horizontal' | 'vertical',
72+
transitionStyle?: 'scroll' | 'curl',
73+
showPageIndicator?: boolean,
6774
}
6875

6976
declare class ViewPagerComponent extends React.Component<ViewPagerProps> {}

0 commit comments

Comments
 (0)