From 17cb1030e620fc62f0df2bf4756622fae5d396d0 Mon Sep 17 00:00:00 2001 From: Sebastian Sebald Date: Wed, 19 Jul 2023 13:44:30 +0200 Subject: [PATCH] docs: some color adjustments for docs (no white bg anymore) (#3161) --- docs/app/_components/SiteHeader.tsx | 2 +- docs/registry/index.tsx | 20 ++++++++++---------- docs/theme/components/Message.styles.ts | 16 ++++------------ docs/theme/root.ts | 2 +- docs/theme/tokens.ts | 17 +++++++---------- 5 files changed, 23 insertions(+), 34 deletions(-) diff --git a/docs/app/_components/SiteHeader.tsx b/docs/app/_components/SiteHeader.tsx index 64958157b0..51e79a8095 100644 --- a/docs/app/_components/SiteHeader.tsx +++ b/docs/app/_components/SiteHeader.tsx @@ -2,7 +2,7 @@ import { MobileNavigation } from './MobileNavigation'; import { SiteNavigation } from './SiteNavigation'; export const SiteHeader = () => ( -
+
diff --git a/docs/registry/index.tsx b/docs/registry/index.tsx index bcd943cd44..568090e650 100644 --- a/docs/registry/index.tsx +++ b/docs/registry/index.tsx @@ -4,6 +4,16 @@ import dynamic from 'next/dynamic'; export const registry = { + rightside: { + name: 'rightside', + demo: dynamic(() => import('@/content/components/aside/rightside.demo')), + file: 'content/components/aside/rightside.demo.tsx', + }, + space: { + name: 'space', + demo: dynamic(() => import('@/content/components/aside/space.demo')), + file: 'content/components/aside/space.demo.tsx', + }, 'basic-accordion': { name: 'basic-accordion', demo: dynamic( @@ -32,16 +42,6 @@ export const registry = { ), file: 'content/components/breakout/vertical-breakout.demo.tsx', }, - rightside: { - name: 'rightside', - demo: dynamic(() => import('@/content/components/aside/rightside.demo')), - file: 'content/components/aside/rightside.demo.tsx', - }, - space: { - name: 'space', - demo: dynamic(() => import('@/content/components/aside/space.demo')), - file: 'content/components/aside/space.demo.tsx', - }, 'button-variant': { name: 'button-variant', demo: dynamic( diff --git a/docs/theme/components/Message.styles.ts b/docs/theme/components/Message.styles.ts index 873f223fa4..5a2a0f5d68 100644 --- a/docs/theme/components/Message.styles.ts +++ b/docs/theme/components/Message.styles.ts @@ -1,23 +1,15 @@ import { ThemeComponent, cva } from '@marigold/system'; export const Message: ThemeComponent<'Message'> = { - container: cva('relative w-full rounded-lg border p-4 pl-11', { + container: cva('not-prose relative w-full rounded-lg p-4 pl-11', { variants: { variant: { - default: 'border-primary-950', - info: 'border-border-info text-text-info bg-bg-info', - warning: 'border-border-warning text-text-warning bg-bg-warning', + info: 'bg-bg-info text-text-info', + warning: 'bg-bg-warning text-text-warning', }, }, - defaultVariants: { - variant: 'default', - }, }), - icon: cva('absolute left-3 top-3 h-6 w-6'), + icon: cva('absolute left-3 top-3 block h-6 w-6'), title: cva('mb-1 font-bold leading-none tracking-tight'), content: cva('text-sm [&_p]:leading-relaxed'), }; - -cva([ - '[&>svg]:text-foreground relative w-full rounded-lg border p-4 [&:has(svg)]:pl-11 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4', -]); diff --git a/docs/theme/root.ts b/docs/theme/root.ts index 1dff4773be..43a9ead716 100644 --- a/docs/theme/root.ts +++ b/docs/theme/root.ts @@ -1,2 +1,2 @@ import { Theme, cva } from '@marigold/system'; -export const root: Theme['root'] = cva('text-text-primary'); +export const root: Theme['root'] = cva('text-text-primary bg-bg-body'); diff --git a/docs/theme/tokens.ts b/docs/theme/tokens.ts index 6704af331e..644d1311d6 100644 --- a/docs/theme/tokens.ts +++ b/docs/theme/tokens.ts @@ -26,18 +26,18 @@ export const colors = { // --------------- text: { primary: { - DEFAULT: brand.primary[950], + DEFAULT: tw.slate[950], }, // State - info: tw.sky[950], - warning: tw.amber[950], + info: tw.blue[950], + warning: tw.amber[800], }, // Background // --------------- bg: { - body: tw.white, + body: tw.slate[50], hover: tw.neutral[100], muted: tw.slate[100], @@ -48,14 +48,11 @@ export const colors = { }, // Status - info: tw.sky[100], - warning: tw.amber[100], + info: tw.blue[100], + warning: tw.amber[50], }, // Border // --------------- - border: { - info: tw.sky[950], - warning: tw.amber[950], - }, + border: {}, };