Skip to content

Commit ebdd6c4

Browse files
fix(docs): try it section
1 parent 8b6aded commit ebdd6c4

File tree

4 files changed

+88
-83
lines changed

4 files changed

+88
-83
lines changed

documentation/src/refine-theme/common-header.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export const CommonHeader = ({
8585
>
8686
<div className={clsx("w-[130px]", "landing-lg:w-[200px]")}>
8787
<Link to="/" onContextMenu={openFigma}>
88-
<RefineCoreLogoIcon className={clsx("text-white")} />
88+
<RefineCoreLogoIcon className={clsx("!text-white")} />
8989
</Link>
9090
</div>
9191
<button
@@ -267,7 +267,7 @@ const MobileMenuModal = ({ isOpen, onClose }: MobileMenuModalProps) => {
267267
)}
268268
>
269269
<Link to="/" onClick={onClose}>
270-
<RefineCoreLogoIcon className={clsx("text-white")} />
270+
<RefineCoreLogoIcon className={clsx("!text-white")} />
271271
</Link>
272272
<button
273273
type="button"

documentation/src/refine-theme/icons/refine-logo.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import clsx from "clsx";
12
import React from "react";
23

34
export const RefineCoreLogoIcon = (props: React.SVGProps<SVGSVGElement>) => (
@@ -10,19 +11,19 @@ export const RefineCoreLogoIcon = (props: React.SVGProps<SVGSVGElement>) => (
1011
>
1112
<path
1213
fill="currentColor"
13-
className="text-zinc-900 dark:text-white"
14+
className={clsx("text-zinc-900 dark:text-white", props.className)}
1415
d="M12 6a2 2 0 1 1 0 4 2 2 0 0 1 0-4Z"
1516
/>
1617
<path
1718
fill="currentColor"
18-
className="text-zinc-900 dark:text-white"
19+
className={clsx("text-zinc-900 dark:text-white", props.className)}
1920
fillRule="evenodd"
2021
d="M10.658.317a3 3 0 0 1 2.684 0l9 4.5A3 3 0 0 1 24 7.5v9a3 3 0 0 1-1.658 2.683l-9 4.5a3 3 0 0 1-2.684 0l-9-4.5A3 3 0 0 1 0 16.499V7.5a3 3 0 0 1 1.658-2.683l9-4.5ZM12 3.999a4 4 0 0 0-4 4v8a4 4 0 1 0 8 0V8a4 4 0 0 0-4-4Z"
2122
clipRule="evenodd"
2223
/>
2324
<path
2425
fill="currentColor"
25-
className="text-zinc-900 dark:text-white"
26+
className={clsx("text-zinc-900 dark:text-white", props.className)}
2627
d="M33.148 18V6.363h4.363c.894 0 1.644.156 2.25.466.61.311 1.07.747 1.381 1.307.314.557.472 1.207.472 1.949 0 .746-.16 1.394-.478 1.943-.314.546-.778.968-1.392 1.267-.613.296-1.367.444-2.261.444h-3.108v-1.75h2.824c.523 0 .95-.073 1.284-.216.333-.148.58-.362.739-.643.163-.284.244-.632.244-1.045 0-.413-.081-.765-.244-1.057a1.554 1.554 0 0 0-.745-.67c-.333-.156-.763-.233-1.29-.233h-1.931V18h-2.108Zm6.011-5.273L42.04 18h-2.352l-2.829-5.273h2.301Zm7.979 5.443c-.875 0-1.631-.182-2.267-.545a3.694 3.694 0 0 1-1.46-1.557c-.342-.674-.512-1.468-.512-2.38 0-.898.17-1.686.511-2.364a3.868 3.868 0 0 1 1.444-1.591c.617-.383 1.342-.574 2.176-.574.538 0 1.045.087 1.523.261.48.17.905.436 1.272.796.371.36.663.818.875 1.375.212.553.318 1.212.318 1.977v.63h-7.153v-1.386h5.182a2.212 2.212 0 0 0-.256-1.05 1.86 1.86 0 0 0-.699-.734 1.965 1.965 0 0 0-1.034-.267c-.42 0-.79.103-1.108.307-.318.2-.566.466-.744.796a2.288 2.288 0 0 0-.267 1.073v1.21c0 .508.093.944.278 1.307.186.36.445.637.779.83.333.19.723.284 1.17.284.3 0 .57-.042.813-.125.242-.087.452-.214.63-.38.178-.167.313-.374.404-.62l1.92.216c-.121.507-.352.95-.693 1.33a3.38 3.38 0 0 1-1.296.874c-.526.205-1.128.307-1.806.307Zm9.977-8.897v1.59h-5.16v-1.59h5.16ZM53.245 18V8.449c0-.587.122-1.076.364-1.466a2.3 2.3 0 0 1 .989-.875c.413-.193.871-.29 1.375-.29.356 0 .672.028.949.085.276.057.48.108.613.154l-.409 1.59a3.566 3.566 0 0 0-.33-.079 1.992 1.992 0 0 0-.443-.045c-.382 0-.653.092-.812.278-.155.182-.233.443-.233.784V18h-2.062Zm5.417 0V9.273h2.056V18h-2.056Zm1.034-9.966a1.2 1.2 0 0 1-.841-.324 1.044 1.044 0 0 1-.352-.79c0-.31.117-.574.352-.79.235-.22.515-.329.84-.329.33 0 .61.11.842.33.235.215.352.479.352.79 0 .306-.117.57-.352.789a1.187 1.187 0 0 1-.841.324Zm5.13 4.852V18H62.77V9.273h1.965v1.482h.103c.2-.488.52-.876.96-1.164.443-.288.99-.432 1.642-.432.602 0 1.127.129 1.574.386.45.258.8.631 1.045 1.12.25.488.373 1.081.37 1.778V18h-2.057V12.76c0-.583-.152-1.04-.455-1.37-.299-.329-.714-.493-1.244-.493-.36 0-.68.08-.96.238-.277.155-.495.38-.654.676-.155.296-.233.654-.233 1.074ZM76.32 18.17c-.875 0-1.63-.182-2.267-.545a3.694 3.694 0 0 1-1.46-1.557c-.341-.674-.511-1.468-.511-2.38 0-.898.17-1.686.51-2.364a3.868 3.868 0 0 1 1.444-1.591c.618-.383 1.343-.574 2.176-.574.538 0 1.046.087 1.523.261.481.17.905.436 1.273.796.37.36.663.818.875 1.375.212.553.318 1.212.318 1.977v.63h-7.154v-1.386h5.182a2.212 2.212 0 0 0-.255-1.05 1.86 1.86 0 0 0-.7-.734 1.965 1.965 0 0 0-1.033-.267c-.42 0-.79.103-1.108.307-.319.2-.567.466-.745.796a2.288 2.288 0 0 0-.267 1.073v1.21c0 .508.093.944.279 1.307.185.36.445.637.778.83.333.19.724.284 1.17.284.3 0 .57-.042.813-.125.243-.087.453-.214.63-.38.179-.167.313-.374.404-.62l1.92.216c-.12.507-.352.95-.693 1.33a3.38 3.38 0 0 1-1.295.874c-.526.205-1.129.307-1.807.307Z"
2728
/>
2829
<path

documentation/src/refine-theme/landing-copy-command-button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export const LandingCopyCommandButton = ({
5151
"pr-6",
5252
"pl-3",
5353
"rounded-lg",
54-
"bg-zinc-800",
54+
"bg-zinc-700",
5555
"bg-opacity-100",
5656
"text-white",
5757
"text-sm",

documentation/src/refine-theme/landing-try-it-section.tsx

Lines changed: 81 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -158,25 +158,25 @@ const LandingTryItOptionsSection = ({
158158
"relative",
159159
"flex",
160160
"flex-col landing-md:flex-row",
161+
"gap-1",
161162
className,
162163
)}
163164
>
164165
<div
165166
className={clsx(
166167
"flex-1",
167-
"rounded-2xl landing-md:rounded-3xl",
168-
"landing-md:rounded-tr-none landing-md:rounded-br-none",
169168
"flex",
170169
"flex-col",
171170
"gap-6 landing-sm:gap-10",
172-
"pt-4 landing-sm:pt-8",
173-
"pb-4 landing-sm:pb-8",
174-
"px-4 landing-sm:px-10",
175-
"bg-zinc-800",
171+
"pt-10",
172+
"pb-20",
173+
"px-10",
174+
"bg-zinc-800 landing-md:bg-transparent",
175+
"rounded-tl-[0.75rem]",
176+
"rounded-tr-[0.75rem]",
177+
"rounded-br-[0.75rem]",
178+
"rounded-bl-[3rem]",
176179
)}
177-
style={{
178-
backgroundRepeat: "no-repeat, repeat",
179-
}}
180180
>
181181
<div
182182
className={clsx(
@@ -221,59 +221,37 @@ const LandingTryItOptionsSection = ({
221221
</div>
222222
<div
223223
className={clsx(
224-
"h-4 landing-md:h-full",
225-
"w-full landing-md:w-0",
226-
"relative",
227-
"flex-shrink-0",
224+
"landing-md:hidden",
225+
"absolute",
226+
"top-1/2",
227+
"left-20",
228+
"-translate-x-1/2",
229+
"-translate-y-1/2",
230+
"text-white",
231+
"w-20 h-20",
232+
"rounded-full",
233+
"text-xl",
234+
"uppercase",
235+
"flex items-center justify-center",
236+
"bg-zinc-900",
228237
)}
229238
>
230-
<div
231-
className={clsx(
232-
"hidden",
233-
"landing-md:block",
234-
"absolute",
235-
"-left-2",
236-
"skew-x-[14deg]",
237-
"top-0",
238-
"h-[272px]",
239-
"w-2",
240-
"bg-gray-900",
241-
)}
242-
/>
243-
<div
244-
className={clsx(
245-
"absolute",
246-
"-top-6 left-8",
247-
"landing-md:top-32 landing-md:-left-1",
248-
"landing-md:-translate-x-1/2",
249-
"landing-md:-translate-y-1/2",
250-
"bg-zinc-900",
251-
"text-white",
252-
"w-16 h-16 landing-md:w-[78px] landing-md:h-[78px]",
253-
"rounded-full",
254-
"text-base",
255-
"uppercase",
256-
"flex items-center justify-center",
257-
)}
258-
>
259-
or
260-
</div>
239+
or
261240
</div>
262241
<div
263242
className={clsx(
264-
"flex-1",
265-
"rounded-2xl landing-md:rounded-3xl",
266243
"flex flex-col",
267-
"landing-md:rounded-tl-none landing-md:rounded-bl-none",
268-
"pt-4 landing-sm:pt-8",
269-
"pb-4 landing-sm:pb-8",
270-
"px-4 landing-sm:px-10",
271-
"bg-zinc-800",
244+
"flex-1",
245+
"pt-20",
246+
"pb-10",
247+
"px-10",
272248
"landing-md:items-end",
249+
"bg-zinc-800 landing-md:bg-transparent",
250+
"rounded-tl-[0.75rem]",
251+
"rounded-tr-[3rem]",
252+
"rounded-br-[0.75rem]",
253+
"rounded-bl-[0.75rem]",
273254
)}
274-
style={{
275-
backgroundRepeat: "no-repeat, repeat",
276-
}}
277255
>
278256
<div
279257
className={clsx(
@@ -294,7 +272,7 @@ const LandingTryItOptionsSection = ({
294272
<div>Run the npm command in Terminal and</div>
295273
<div>follow the wizard instructions.</div>
296274
</div>
297-
<LandingCopyCommandButton className={"!bg-zinc-700"} />
275+
<LandingCopyCommandButton />
298276
</div>
299277
</div>
300278
</div>
@@ -344,25 +322,13 @@ const LandingTryItWizardSection = ({
344322
"landing-md:flex",
345323
)}
346324
>
347-
<div
348-
className={clsx(
349-
"flex-1",
350-
"bg-zinc-900",
351-
"opacity-0",
352-
visible && "opacity-100",
353-
"transition-[background-color,background,opacity]",
354-
"duration-150",
355-
"ease-in-out",
356-
"bg-no-repeat",
357-
)}
358-
/>
325+
{!visible && <BackgroundGraphicDesktop />}
359326
<div
360327
ref={ref}
361328
className={clsx(
362329
"box-content",
363330
"flex-shrink-0",
364331
"rounded-2xl landing-md:rounded-3xl",
365-
"bg-zinc-800",
366332
"border border-solid",
367333
"transition-[border-color,width,height,opacity,background-color]",
368334
"mx-auto",
@@ -372,7 +338,7 @@ const LandingTryItWizardSection = ({
372338
"scrollbar-hidden",
373339
!visible && ["pointer-events-none", "select-none"],
374340
!visible && ["landing-md:border-transparent"],
375-
visible && ["landing-md:border-zinc-700", "landing-md:bg-zinc-800"],
341+
visible && ["landing-md:border-zinc-700"],
376342
!visible && [
377343
"landing-md:opacity-0",
378344
"landing-md:h-0",
@@ -408,18 +374,56 @@ const LandingTryItWizardSection = ({
408374
/>
409375
) : null}
410376
</div>
377+
</div>
378+
);
379+
};
380+
381+
const BackgroundGraphicDesktop = (props) => {
382+
return (
383+
<div
384+
className={clsx(
385+
"absolute",
386+
"top-0",
387+
"left-0",
388+
"w-full",
389+
"h-full",
390+
"overflow-hidden",
391+
"pointer-events-none",
392+
"z-0",
393+
)}
394+
>
395+
<svg
396+
xmlns="http://www.w3.org/2000/svg"
397+
width="100%"
398+
height="100%"
399+
viewBox="0 0 1200 208"
400+
fill="none"
401+
preserveAspectRatio="none"
402+
{...props}
403+
>
404+
<path
405+
fill="#27272A"
406+
d="M640.76 196.648c2.447 5.3-1.425 11.352-7.263 11.352H12c-6.627 0-12-5.373-12-12V12C0 5.373 5.373 0 12 0h476.576c37.445 0 71.473 21.772 87.164 55.77l65.02 140.878ZM1200 196c0 6.627-5.37 12-12 12H711.424c-37.445 0-71.473-21.772-87.164-55.77L559.24 11.353C556.793 6.051 560.665 0 566.503 0H1188c6.63 0 12 5.373 12 12v184Z"
407+
/>
408+
</svg>
411409
<div
412410
className={clsx(
413-
"flex-1",
411+
"absolute",
412+
"top-1/2",
413+
"left-1/2",
414+
"-translate-x-1/2",
415+
"-translate-y-1/2",
416+
"text-white",
417+
"w-20 h-20",
418+
"rounded-full",
419+
"text-xl",
420+
"uppercase",
421+
"flex items-center justify-center",
414422
"bg-zinc-900",
415-
"opacity-0",
416-
visible && "opacity-100",
417-
"transition-[background-color,background,opacity]",
418-
"duration-150",
419-
"ease-in-out",
420-
"bg-no-repeat",
421423
)}
422-
/>
424+
>
425+
or
426+
</div>
423427
</div>
424428
);
425429
};

0 commit comments

Comments
 (0)