|
| 1 | +import { CheckCircle2Icon, MinusIcon } from "lucide-react"; |
| 2 | +interface ToolFeature { |
| 3 | + name: string; |
| 4 | + features: { [feature: string]: string }; |
| 5 | +} |
| 6 | + |
| 7 | +const tools: ToolFeature[] = [ |
| 8 | + { |
| 9 | + name: "Papermark Business Plan", |
| 10 | + features: { |
| 11 | + docs: "Yes", |
| 12 | + folders: "Yes", |
| 13 | + linksettings: "Yes", |
| 14 | + advancedanalytics: "Yes", |
| 15 | + timerecorded: "Yes", |
| 16 | + blocklist: "Yes", |
| 17 | + verifications: "Yes", |
| 18 | + branding: "Yes", |
| 19 | + support: "Yes", |
| 20 | + notifications: "No", |
| 21 | + rooms: "No", |
| 22 | + users: "No", |
| 23 | + sso: "No", |
| 24 | + upload: "No", |
| 25 | + migration: "No", |
| 26 | + support2: "No", |
| 27 | + self: "No", |
| 28 | + white: "No", |
| 29 | + }, |
| 30 | + }, |
| 31 | + |
| 32 | + // data room,whitelabelling |
| 33 | + { |
| 34 | + name: "Papermark Custom Plan", |
| 35 | + features: { |
| 36 | + docs: "Yes", |
| 37 | + folders: "Yes", |
| 38 | + linksettings: "Yes", |
| 39 | + advancedanalytics: "Yes", |
| 40 | + timerecorded: "Yes", |
| 41 | + blocklist: "Yes", |
| 42 | + verifications: "Yes", |
| 43 | + branding: "Yes", |
| 44 | + support: "Yes", |
| 45 | + notifications: "Yes", |
| 46 | + rooms: "Yes", |
| 47 | + users: "Yes", |
| 48 | + migration: "Yes", |
| 49 | + support2: "Yes", |
| 50 | + sso: "Yes", |
| 51 | + upload: "Yes", |
| 52 | + self: "No", |
| 53 | + white: "No", |
| 54 | + }, |
| 55 | + }, |
| 56 | + { |
| 57 | + name: "Papermark Self-Hosted Plan", |
| 58 | + |
| 59 | + features: { |
| 60 | + docs: "Yes", |
| 61 | + folders: "Yes", |
| 62 | + linksettings: "Yes", |
| 63 | + advancedanalytics: "Yes", |
| 64 | + timerecorded: "Yes", |
| 65 | + blocklist: "Yes", |
| 66 | + verifications: "Yes", |
| 67 | + branding: "Yes", |
| 68 | + support: "Yes", |
| 69 | + notifications: "Yes", |
| 70 | + rooms: "Yes", |
| 71 | + users: "Yes", |
| 72 | + migration: "Yes", |
| 73 | + support2: "Yes", |
| 74 | + sso: "Yes", |
| 75 | + upload: "Yes", |
| 76 | + self: "Yes", |
| 77 | + white: "Yes", |
| 78 | + }, |
| 79 | + }, |
| 80 | + |
| 81 | + // Add other tools in a similar format |
| 82 | +]; |
| 83 | + |
| 84 | +const featureDisplayNames: { [key: string]: string } = { |
| 85 | + docs: "Unlimited documents", |
| 86 | + folders: "Unlimited folders", |
| 87 | + linksettings: "Custom Link Settings", |
| 88 | + advancedanalytics: "Advanced Analytics", |
| 89 | + timerecorded: "Time recorded on each page", |
| 90 | + blocklist: "Allow & Block List", |
| 91 | + verifications: "Email verifications", |
| 92 | + notifications: "Notifications", |
| 93 | + branding: "Custom data room branding", |
| 94 | + rooms: "Unlimited data rooms", |
| 95 | + users: "User Groups", |
| 96 | + white: "Full white-labelling", |
| 97 | + sso: "SSO", |
| 98 | + upload: "Bulk upload", |
| 99 | + self: "Self-hosted on your servers", |
| 100 | + migration: "Migration from other platform", |
| 101 | + support: "48h email support ", |
| 102 | + support2: "24h support ", |
| 103 | +}; |
| 104 | + |
| 105 | +export default function ComparisonTable() { |
| 106 | + const renderFeatureName = (feature: string | boolean) => { |
| 107 | + // If the feature is a string, return it as is |
| 108 | + if (typeof feature === "string") { |
| 109 | + return feature; |
| 110 | + } |
| 111 | + |
| 112 | + // If the feature is a boolean, return a checkmark or a minus icon |
| 113 | + if (feature) { |
| 114 | + return ( |
| 115 | + <CheckCircle2Icon |
| 116 | + className="h-6 w-6 flex-none text-[#fb7a00]" |
| 117 | + aria-hidden="true" |
| 118 | + /> |
| 119 | + ); |
| 120 | + } else { |
| 121 | + return ( |
| 122 | + <MinusIcon |
| 123 | + className="h-6 w-6 flex-none text-black" |
| 124 | + aria-hidden="true" |
| 125 | + /> |
| 126 | + ); |
| 127 | + } |
| 128 | + }; |
| 129 | + const featuresList = Object.keys(tools[0].features); |
| 130 | + |
| 131 | + return ( |
| 132 | + <div className=""> |
| 133 | + {/* <div className="mt-20 px-6 py-12 sm:px-6 sm:py-6 lg:px-8"> |
| 134 | + <div className="mx-auto max-w-2xl text-center"> |
| 135 | + <h2 className="text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl"> |
| 136 | + Compare best Docsend alternatives based on core features |
| 137 | + <br /> |
| 138 | + </h2> |
| 139 | + <p className="mx-auto mt-6 max-w-xl text-lg leading-8 text-gray-600"> |
| 140 | + Check all the features you need to securely share documents |
| 141 | + </p> |
| 142 | + </div> |
| 143 | + </div> */} |
| 144 | + <div className="mt-6 flow-root"> |
| 145 | + <div className="rounded-lg border border-gray-300 bg-gray-100 overflow-x-auto "> |
| 146 | + <div className="inline-block min-w-full align-middle"> |
| 147 | + <table className="min-w-full divide-y divide-gray-300 border border-gray-300 "> |
| 148 | + <thead> |
| 149 | + <tr> |
| 150 | + <th className="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 text-balance"> |
| 151 | + Data Room Feature |
| 152 | + </th> |
| 153 | + {tools.map((tool) => ( |
| 154 | + <th |
| 155 | + key={tool.name} |
| 156 | + className="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 text-balance" |
| 157 | + > |
| 158 | + {tool.name} |
| 159 | + </th> |
| 160 | + ))} |
| 161 | + </tr> |
| 162 | + </thead> |
| 163 | + <tbody className="divide-y divide-gray-200 bg-white border border-gray-300 "> |
| 164 | + {featuresList.map((feature) => ( |
| 165 | + <tr key={feature}> |
| 166 | + <td className="px-3 py-4 text-sm text-gray-900 text-balance border border-gray-300 font-semibold "> |
| 167 | + {featureDisplayNames[feature]} |
| 168 | + </td> |
| 169 | + {tools.map((tool) => ( |
| 170 | + <td |
| 171 | + key={tool.name} |
| 172 | + className={`px-3 py-4 text-sm ${ |
| 173 | + tool.name === "Papermark" |
| 174 | + ? "bg-green-50 text-green-700 font-semibold text-balance" |
| 175 | + : "" |
| 176 | + }`} // Consistent text color, conditional background color |
| 177 | + > |
| 178 | + {tool.features[feature]} |
| 179 | + </td> |
| 180 | + ))} |
| 181 | + </tr> |
| 182 | + ))} |
| 183 | + </tbody> |
| 184 | + </table> |
| 185 | + </div> |
| 186 | + </div> |
| 187 | + </div> |
| 188 | + </div> |
| 189 | + ); |
| 190 | +} |
0 commit comments