PluginProbe ʕ •ᴥ•ʔ
Everest Forms – Contact Form, Payment Form, Quiz, Survey & Custom Form Builder with AI / 3.2.4
Everest Forms – Contact Form, Payment Form, Quiz, Survey & Custom Form Builder with AI v3.2.4
3.6.0 3.5.3 3.5.2 3.5.1 3.5.0 3.4.8 3.4.7 3.4.6 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.5.1 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.9 1.5.0 1.5.1 1.5.10 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.6.1 1.6.7 1.7.0 1.7.0.1 1.7.0.2 1.7.0.3 1.7.1 1.7.2 1.7.2.1 1.7.2.2 1.7.3 1.7.4 1.7.5 1.7.5.1 1.7.5.2 1.7.6 1.7.7 1.7.7.1 1.7.7.2 1.7.8 1.7.9 1.8.0 1.8.0.1 1.8.1 1.8.2 1.8.2.1 1.8.2.2 1.8.2.3 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 1.8.9 1.9.0 1.9.0.1 1.9.1 1.9.2 1.9.3 1.9.4 1.9.4.1 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 2.0.0.1 2.0.1 2.0.2 2.0.3 2.0.3.1 2.0.4 2.0.4.1 2.0.5 2.0.6 2.0.7 2.0.8 2.0.8.1 2.0.9 3.0.0 3.0.0.1 3.0.1 3.0.2 3.0.3 3.0.3.1 3.0.4 3.0.4.1 3.0.4.2 3.0.5 3.0.5.1 3.0.5.2 3.0.6 3.0.6.1 3.0.7.1 3.0.8 3.0.8.1 3.0.9 3.0.9.1 3.0.9.2 3.0.9.3 3.0.9.4 3.0.9.5 3.1.0 3.1.1 3.1.2 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.3.0 3.4.0 3.4.1 3.4.2 3.4.2.1 3.4.3 3.4.4 3.4.5 trunk 1.0 1.0.1 1.0.2 1.0.3
everest-forms / src / templates / App.tsx
everest-forms / src / templates Last commit date
components 1 year ago images 1 year ago types 1 year ago utils 1 year ago App.tsx 1 year ago index.tsx 1 year ago
App.tsx
124 lines
1 import { __ } from '@wordpress/i18n';
2 import React, { useState, useMemo } from "react";
3 import {
4 ChakraProvider,
5 Box,
6 HStack,
7 Text,
8 Tabs,
9 TabList,
10 Tab,
11 Button,
12 Icon,
13 Divider,
14 VStack,
15 Heading,
16 } from "@chakra-ui/react";
17 import Main from "./components/Main";
18
19 const EVFIcon = (props) => (
20 <Icon viewBox="0 0 24 24" {...props}>
21 <path
22 fill="#7e3bd0"
23 d="M21.23,10H17.79L16.62,8h3.46ZM17.77,4l1.15,2H15.48L14.31,4Zm-15,16L12,4l5.77,10H10.85L12,12h2.31L12,8,6.23,18H20.08l1.16,2Z"
24 />
25 </Icon>
26 );
27
28 const TabFilters = ({ onTabChange }) => {
29 const filters = useMemo(() => [__("All", "everest-forms"), __("Free", "everest-forms"), __("Premium", "everest-forms")], []);
30
31 return (
32 <Tabs variant="unstyled" ml="auto" onChange={onTabChange}>
33 <TabList>
34 {filters.map((label) => (
35 <Tab
36 key={label}
37 _selected={{
38 color: "purple.500",
39 fontWeight: "bold",
40 borderBottom: "2px solid",
41 borderColor: "purple.500",
42 }}
43 fontSize={{ base: "sm", md: "md", lg: "lg" }}
44 px={{ base: 1, md: 2 }} // Add horizontal padding to tabs
45 >
46 {label}
47 </Tab>
48 ))}
49 </TabList>
50 </Tabs>
51 );
52 };
53
54 const App = () => {
55 const [selectedTab, setSelectedTab] = useState<string>(__("All", "everest-forms"));
56
57 // Handle tab changes
58 const handleTabChange = (index: number) => {
59 const filters = [__("All", "everest-forms"), __("Free", "everest-forms"), __("Premium", "everest-forms")];
60 setSelectedTab(filters[index]);
61 };
62
63 // Handle refresh button click
64 const handleRefreshTemplates = () => {
65 const url = new URL(window.location.href);
66 url.searchParams.set('refresh', Date.now().toString());
67 window.location.href = url.toString();
68 };
69
70 return (
71 <ChakraProvider>
72 <Box bg="white" margin="20px" padding="0px 24px 50px" boxShadow="0px 4px 50px rgba(0, 0, 0, 0.06)">
73 <HStack
74 spacing={{ base: 4, md: 6 }}
75 align="center"
76 mb={0}
77 borderBottom="1px solid #CDD0D8"
78 padding="20px 10px"
79 direction={{ base: "column", md: "row" }}
80 >
81 <EVFIcon boxSize="12" />
82 <Divider orientation="vertical" height="40px" borderColor="#CDD0D8" />
83 <Text fontSize="18px" fontWeight="semibold" lineHeight="26px" color="#383838" textAlign={{ base: "center", md: "left" }} margin="0px">
84 {__("Add New Form", "everest-forms")}
85 </Text>
86 <Button
87 colorScheme="purple"
88 variant="outline"
89 onClick={handleRefreshTemplates}
90 width={{ base: "full", md: "auto" }}
91 display={{ base: "none", md: "inline-flex" }}
92 fontSize= "15px"
93 lineHeight="20px"
94 padding="8px 16px"
95 height="auto"
96 borderRadius="4px"
97 >
98 {__("Refresh Templates", "everest-forms")}
99 </Button>
100 <TabFilters onTabChange={handleTabChange} />
101 </HStack>
102
103 {/* Main Content Area */}
104 <Box bg="white" >
105 <VStack align="start" padding="20px 0px 32px" gap="12px">
106 <Heading as="h1" fontSize="24px"lineHeight="34px" letterSpacing="0.4px" fontWeight="semibold" m={0}>
107 {__("Select a Template", "everest-forms")}
108 </Heading>
109 <Text fontSize="14px" lineHeight="24px" color="#4D4D4D" fontWeight="400" margin="0px" >
110 {__(
111 "To get started quickly, you can pick from our ready-made templates, begin with a blank form, or design your own.",
112 "everest-forms"
113 )}
114 </Text>
115 </VStack>
116 <Main filter={selectedTab} />
117 </Box>
118 </Box>
119 </ChakraProvider>
120 );
121 };
122
123 export default App;
124