Files
notesnook/apps/mobile/app/components/dialogs/result/pro-features.js

100 lines
3.0 KiB
JavaScript
Raw Normal View History

/*
This file is part of the Notesnook project (https://notesnook.com/)
2023-01-16 13:44:52 +05:00
Copyright (C) 2023 Streetwriters (Private) Limited
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
2022-08-30 16:13:11 +05:00
2022-08-29 16:19:17 +05:00
import React from "react";
import { View } from "react-native";
import Icon from "react-native-vector-icons/MaterialCommunityIcons";
import { eSendEvent } from "../../../services/event-manager";
2022-08-29 16:19:17 +05:00
import { useThemeStore } from "../../../stores/use-theme-store";
2022-02-28 15:32:55 +05:00
import {
2023-01-03 10:23:48 +05:00
eCloseSheet,
2022-02-28 15:32:55 +05:00
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 colors = useThemeStore((state) => state.colors);
return (
<>
{[
{
content:
"Unlock unlimited notebooks, tags, colors. Organize like a pro"
},
{
content:
"Attach files upto 500MB, upload 4K images with unlimited storage"
},
{
content: "Instantly sync to unlimited devices"
},
{
content: "A private vault to keep everything imporant always locked"
2021-11-20 17:39:03 +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) => (
2021-11-20 17:39:03 +05:00
<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%",
2021-11-20 17:39:03 +05:00
height: 40,
paddingHorizontal: 0,
marginBottom: 10,
alignItems: "center",
2021-11-20 17:39:03 +05:00
borderRadius: 5,
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" />
<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);
2023-01-03 10:23:48 +05:00
eSendEvent(eCloseSheet);
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>
</>
);
};