mirror of https://github.com/buster-so/buster.git
move legend
This commit is contained in:
parent
07d495c824
commit
1ca8ee048d
|
@ -1,9 +1,10 @@
|
||||||
import { createStyles } from 'antd-style';
|
import { createStyles } from 'antd-style';
|
||||||
import React, { useMemo } from 'react';
|
import React, { useMemo } from 'react';
|
||||||
import { useMemoizedFn } from 'ahooks';
|
import { useMemoizedFn } from 'ahooks';
|
||||||
import { AppMaterialIcons } from '@/components/ui';
|
|
||||||
import { BusterChartLegendItem } from './interfaces';
|
import { BusterChartLegendItem } from './interfaces';
|
||||||
import { ChartType } from '../interfaces';
|
import { ChartType } from '../interfaces';
|
||||||
|
import { Target } from '../../icons';
|
||||||
|
import { cn } from '@/lib/classMerge';
|
||||||
|
|
||||||
export const LegendItemDot: React.FC<{
|
export const LegendItemDot: React.FC<{
|
||||||
color: string | undefined;
|
color: string | undefined;
|
||||||
|
@ -55,11 +56,13 @@ export const LegendItemDot: React.FC<{
|
||||||
onClick={onFocusItemPreflight}
|
onClick={onFocusItemPreflight}
|
||||||
className="absolute hidden w-full items-center justify-center overflow-hidden group-hover:flex">
|
className="absolute hidden w-full items-center justify-center overflow-hidden group-hover:flex">
|
||||||
<div className="focus-item flex h-full w-full items-center justify-center">
|
<div className="focus-item flex h-full w-full items-center justify-center">
|
||||||
<AppMaterialIcons
|
<div
|
||||||
size={size === 'sm' ? 8 : 12}
|
className={cn(
|
||||||
className={cx(styles.focusDot, size)}
|
'flex items-center justify-center',
|
||||||
icon="target"
|
size === 'sm' ? 'text-xxs' : 'text-sm'
|
||||||
/>
|
)}>
|
||||||
|
<Target />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -17,6 +17,10 @@
|
||||||
--default-border-width: 0.5px;
|
--default-border-width: 0.5px;
|
||||||
|
|
||||||
/* font size */
|
/* font size */
|
||||||
|
--text-3xs: 6px;
|
||||||
|
--text-3xs--line-height: 1;
|
||||||
|
--text-2xs: 8px;
|
||||||
|
--text-2xs--line-height: 1;
|
||||||
--text-xxs: 10px;
|
--text-xxs: 10px;
|
||||||
--text-xxs--line-height: 1;
|
--text-xxs--line-height: 1;
|
||||||
--text-xs: 11px;
|
--text-xs: 11px;
|
||||||
|
|
Loading…
Reference in New Issue