Skip to content

Commit 4e13f8c

Browse files
committed
feat(competitor): add Chromatic advantages
1 parent 9f7fe4a commit 4e13f8c

File tree

2 files changed

+36
-2
lines changed

2 files changed

+36
-2
lines changed

app/compare/chromatic/page.tsx

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Metadata } from "next";
22

33
import { ComparePricingSlider } from "@/app/common/PricingSlider";
4+
import { Th, ThMain, ThSub, ThSubLink, Tr } from "@/components/ComparisonTable";
45
import { getMetadata } from "@/lib/metadata";
56

67
import {
@@ -11,7 +12,7 @@ import {
1112
TableSection,
1213
TrySection,
1314
} from "../common";
14-
import { ComparisonTable, Features } from "../comparison-table";
15+
import { ComparisonTable, Feature, Features } from "../comparison-table";
1516
import chromaticEmblem from "./chromatic-emblem.svg";
1617
import chromaticLogoDark from "./chromatic-logo-dark.svg";
1718
import chromaticLogo from "./chromatic-logo.svg";
@@ -95,6 +96,36 @@ export default function Page() {
9596
logoSrcDark={chromaticLogoDark}
9697
title="Percy"
9798
features={features}
99+
additionals={
100+
<>
101+
<Tr>
102+
<Th>
103+
<ThMain>Screenshot in Play function</ThMain>
104+
<ThSubLink href="/docs/storybook#interactions-using-the-play-function">
105+
Take screenshots during the test
106+
</ThSubLink>
107+
</Th>
108+
<Feature
109+
feature={{
110+
argos: "✔️",
111+
competitor: "❌",
112+
}}
113+
/>
114+
</Tr>
115+
<Tr>
116+
<Th>
117+
<ThMain>No time-limit for Play function</ThMain>
118+
<ThSub>Take screenshots of long-running tests</ThSub>
119+
</Th>
120+
<Feature
121+
feature={{
122+
argos: "✔️",
123+
competitor: "❌",
124+
}}
125+
/>
126+
</Tr>
127+
</>
128+
}
98129
/>
99130
</TableSection>
100131

app/compare/comparison-table.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function FeatureTd(props: { value: React.ReactNode }) {
4242
);
4343
}
4444

45-
function Feature(props: { feature: Feature }) {
45+
export function Feature(props: { feature: Feature }) {
4646
return (
4747
<>
4848
<FeatureTd value={props.feature.argos} />
@@ -56,6 +56,7 @@ export function ComparisonTable(props: {
5656
logoSrc: string;
5757
logoSrcDark?: string;
5858
features: Features;
59+
additionals?: React.ReactNode;
5960
}) {
6061
return (
6162
<Table>
@@ -74,6 +75,8 @@ export function ComparisonTable(props: {
7475
<Feature feature={props.features.pricing} />
7576
</Tr>
7677

78+
{props.additionals}
79+
7780
<Tr>
7881
<Th>
7982
<ThMain>Playwright debugging</ThMain>

0 commit comments

Comments
 (0)