Skip to content

Commit fc38e1b

Browse files
committed
refactor: lighten demo viewer background in dark mode
1 parent ba6eb67 commit fc38e1b

3 files changed

Lines changed: 24 additions & 24 deletions

File tree

apps/showcase/assets/styles/layout/variables/main/_dark.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
--designer-primary-contrast-color: #000000;
3131
--designer-focus-outline-color: #ffffff;
3232

33-
--code-figure-background: var(--p-surface-950);
33+
--code-figure-background: color-mix(in srgb, var(--p-surface-900) 40%, var(--p-surface-950) 60%);
3434
--code-figure-color: var(--p-surface-0);
3535
--code-figure-border: var(--p-surface-800);
3636
--code-figure-number-color: var(--p-surface-500);

apps/showcase/shared/components/docs/doc-demo-wrapper.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
'use client';
2+
import { Code } from '@primeicons/react/code';
3+
import { Times } from '@primeicons/react/times';
24
import { cn } from '@primeuix/utils';
35
import React from 'react';
46
import DocCopyButton from './doc-copy-button';
57
import { DocDemoViewerProps } from './doc-demo-viewer';
6-
import { Code } from '@primeicons/react/code';
7-
import { Times } from '@primeicons/react/times';
88

99
const COMPONENT_PATH_REGEX = /'@\/components\/ui\/[a-zA-Z0-9\-_/]+'/g;
1010

@@ -39,12 +39,12 @@ export default function DocDemoWrapper({
3939
: (highlightedCode as string);
4040

4141
return (
42-
<div className={cn('mb-16 mt-2 p-2 space-y-2 rounded-[14px] bg-surface-100 dark:bg-surface-800/75 shadow-[0_0_0_0.5px_rgba(0,0,0,0.2)] dark:shadow-[0_0_0_0.5px_rgba(255,255,255,0.2)]', className)} {...props}>
42+
<div className={cn('mb-16 mt-2 p-2.25 space-y-2.25 rounded-[14px] bg-surface-100 dark:bg-surface-800/60 shadow-[0_0_0_0.5px_rgba(0,0,0,0.2)] dark:shadow-[0_0_0_0.5px_rgba(255,255,255,0.2)]', className)} {...props}>
4343
{component && (
44-
<div className="flex flex-col overflow-hidden bg-surface-0 dark:bg-surface-950 rounded-[8px] shadow-[0_0_0_0.5px_rgba(0,0,0,0.2)] dark:shadow-[0_0_0_0.5px_rgba(255,255,255,0.15)]">
44+
<div className="flex flex-col overflow-hidden bg-(--code-figure-background) rounded-[8px] shadow-[0_0_0_0.5px_rgba(0,0,0,0.2)] dark:shadow-[0_0_0_0.5px_rgba(255,255,255,0.15)]">
4545
<div className="flex-1 pt-8 px-8 pb-5 md:pt-10 md:px-10 md:pb-7">{component}</div>
4646
<div className="flex items-center gap-2 pl-2.5 pr-1.5 py-1.5">
47-
<span className="px-2 py-1.5 rounded-md bg-surface-100 dark:bg-surface-900 font-mono text-sm uppercase text-surface-400 dark:text-surface-500 whitespace-nowrap leading-3 tracking-tight">{demo}</span>
47+
<span className="px-2 py-1.5 rounded-md bg-surface-100 dark:bg-surface-800/75 font-mono text-sm uppercase text-surface-400 dark:text-surface-500 whitespace-nowrap leading-3 tracking-tight">{demo}</span>
4848
<div className="flex items-center justify-end flex-1">
4949
<div className="flex items-center gap-px">
5050
{mode === 'compact' ? (

pnpm-lock.yaml

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)