Files
notesnook/apps/mobile/src/components/ResultDialog/ProFeatures.js

79 lines
2.2 KiB
JavaScript
Raw Normal View History

import React from 'react';
import {View} from 'react-native';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
import {useTracked} from '../../provider';
2021-11-15 15:25:06 +05:00
import {eSendEvent} from '../../services/EventManager';
2021-11-22 15:12:26 +05:00
import {
eCloseProgressDialog,
eCloseResultDialog,
eOpenPremiumDialog
} from '../../utils/Events';
import {SIZE} from '../../utils/SizeUtils';
2021-11-15 15:25:06 +05:00
import {sleep} from '../../utils/TimeUtils';
import Paragraph from '../Typography/Paragraph';
2021-11-20 17:39:03 +05:00
export const ProFeatures = ({count = 6}) => {
const [state, dispatch] = useTracked();
const {colors} = state;
return (
<>
{[
{
2021-11-20 17:39:03 +05:00
content:
'Unlock unlimited notebooks, tags, colors. Organize like a pro'
},
{
2021-11-20 17:39:03 +05:00
content:
'Attach files upto 500MB, upload 4K images with unlimited storage'
},
{
2021-11-20 17:39:03 +05:00
content: 'Instantly sync to unlimited devices'
},
{
2021-11-20 17:39:03 +05:00
content: 'A private vault to keep everything imporant always locked'
},
{
content:
'Rich note editing experience with markdown, tables, checklists and more'
},
{
content: 'Export your notes in Pdf, markdown and html formats'
}
2021-11-20 17:39:03 +05:00
]
.slice(0, count)
.map(item => (
<View
style={{
flexDirection: 'row',
width: '100%',
height: 40,
paddingHorizontal: 0,
marginBottom: 10,
alignItems: 'center',
borderRadius: 5,
2021-11-22 15:12:26 +05:00
justifyContent: 'flex-start'
2021-11-20 17:39:03 +05:00
}}>
<Icon size={SIZE.lg} color={colors.accent} name="check" />
<Paragraph style={{marginLeft: 5, flexShrink: 1}}>
{item.content}
</Paragraph>
</View>
))}
<Paragraph
2021-11-15 15:25:06 +05:00
onPress={async () => {
eSendEvent(eCloseResultDialog);
2021-11-20 17:39:03 +05:00
eSendEvent(eCloseProgressDialog);
2021-11-15 15:25:06 +05:00
await sleep(300);
eSendEvent(eOpenPremiumDialog);
}}
2021-12-16 10:20:34 +05:00
size={SIZE.xs + 1}
style={{
textDecorationLine: 'underline',
color: colors.icon
}}>
See all features included in Notesnook Pro
</Paragraph>
</>
);
};