mirror of
https://github.com/fankes/komari-theme-purcarte.git
synced 2025-10-21 12:59:23 +08:00
fix: 优化亮暗模式下文本可读性
This commit is contained in:
@@ -54,10 +54,7 @@ function ChartContainer({
|
||||
<div
|
||||
data-slot="chart"
|
||||
data-chart={chartId}
|
||||
className={cn(
|
||||
"[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden",
|
||||
className
|
||||
)}
|
||||
className={cn("flex justify-center text-xs", className)}
|
||||
style={{ position: "relative", overflow: "hidden" }}
|
||||
{...props}>
|
||||
<ChartStyle id={chartId} config={config} />
|
||||
|
@@ -14,7 +14,7 @@ interface TipsProps {
|
||||
|
||||
const Tips: React.FC<TipsProps & React.HTMLAttributes<HTMLDivElement>> = ({
|
||||
size = "16",
|
||||
color = "gray",
|
||||
color = "var(--theme-text-muted-color)",
|
||||
trigger,
|
||||
children,
|
||||
side = "bottom",
|
||||
@@ -68,13 +68,15 @@ const Tips: React.FC<TipsProps & React.HTMLAttributes<HTMLDivElement>> = ({
|
||||
sideOffset={5}
|
||||
onMouseEnter={!isMobile ? () => setIsOpen(true) : undefined}
|
||||
onMouseLeave={!isMobile ? () => setIsOpen(false) : undefined}
|
||||
className="purcarte-blur theme-card-style z-50 text-muted-foreground"
|
||||
className="purcarte-blur theme-card-style z-50"
|
||||
style={{
|
||||
minWidth: isMobile ? "12rem" : "16rem",
|
||||
maxWidth: isMobile ? "80vw" : "16rem",
|
||||
backgroundColor: "var(--card)",
|
||||
}}>
|
||||
<div className="relative text-sm">{children}</div>
|
||||
<div className="relative text-sm text-secondary-foreground">
|
||||
{children}
|
||||
</div>
|
||||
</Popover.Content>
|
||||
</Popover.Root>
|
||||
)}
|
||||
|
Reference in New Issue
Block a user