-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy pathBase.stories.tsx
More file actions
56 lines (47 loc) · 1.41 KB
/
Base.stories.tsx
File metadata and controls
56 lines (47 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import React, { useRef } from 'react';
import { View } from 'react-native';
import Base, { type IBase } from '.';
import { TYPE } from '../constants';
export default {
title: 'Passcode/Base'
};
const PasscodeBase = ({ ...props }) => {
const ref = useRef<IBase>(null);
return <Base ref={ref} type={TYPE.CHOOSE} title='Create Passcode' onEndProcess={() => {}} {...props} />;
};
export const ChooseType = () => (
<View style={{ flex: 1 }}>
<PasscodeBase type={TYPE.CHOOSE} title='Create Passcode' />
</View>
);
export const ConfirmType = () => (
<View style={{ flex: 1 }}>
<PasscodeBase type={TYPE.CONFIRM} title='Confirm Passcode' previousPasscode='123456' onError={() => {}} />
</View>
);
export const EnterType = () => (
<View style={{ flex: 1 }}>
<PasscodeBase type={TYPE.ENTER} title='Enter Passcode' />
</View>
);
export const WithSubtitle = () => (
<View style={{ flex: 1 }}>
<PasscodeBase type={TYPE.CHOOSE} title='Create Passcode' subtitle='This passcode will protect your data' />
</View>
);
export const WithBiometry = () => (
<View style={{ flex: 1 }}>
<PasscodeBase type={TYPE.ENTER} title='Enter Passcode' showBiometry onBiometryPress={() => {}} />
</View>
);
export const EnterWithSubtitleAndBiometry = () => (
<View style={{ flex: 1 }}>
<PasscodeBase
type={TYPE.ENTER}
title='Unlock App'
subtitle='Authentication required'
showBiometry
onBiometryPress={() => {}}
/>
</View>
);