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

73 lines
2.2 KiB
JavaScript
Raw Normal View History

import React from 'react';
2022-01-22 12:57:05 +05:00
import { View } from 'react-native';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
2022-01-22 12:57:05 +05:00
import { useTracked } from '../../provider';
import { eSendEvent } from '../../services/EventManager';
2022-02-28 13:48:59 +05:00
import { eCloseProgressDialog, eCloseResultDialog, eOpenPremiumDialog } from '../../utils/events';
import { SIZE } from '../../utils/size';
import { sleep } from '../../utils/time';
import Paragraph from '../ui/typography/paragraph';
2022-01-22 12:57:05 +05:00
export const ProFeatures = ({ count = 6 }) => {
const [state, dispatch] = useTracked();
2022-01-22 12:57:05 +05:00
const { colors } = state;
return (
<>
{[
{
2022-01-22 12:57:05 +05:00
content: 'Unlock unlimited notebooks, tags, colors. Organize like a pro'
},
{
2022-01-22 12:57:05 +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'
},
{
2022-01-22 12:57:05 +05:00
content: 'Rich note editing experience with markdown, tables, checklists and more'
2021-11-20 17:39:03 +05:00
},
{
content: 'Export your notes in Pdf, markdown and html formats'
}
2021-11-20 17:39:03 +05:00
]
.slice(0, count)
.map(item => (
<View
2022-01-22 12:57:05 +05:00
key={item.content}
2021-11-20 17:39:03 +05:00
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'
2022-01-22 12:57:05 +05:00
}}
>
2021-11-20 17:39:03 +05:00
<Icon size={SIZE.lg} color={colors.accent} name="check" />
2022-01-22 12:57:05 +05:00
<Paragraph style={{ marginLeft: 5, flexShrink: 1 }}>{item.content}</Paragraph>
2021-11-20 17:39:03 +05:00
</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
2022-01-22 12:57:05 +05:00
}}
>
See all features included in Notesnook Pro
</Paragraph>
</>
);
};