mirror of https://github.com/buster-so/buster.git
fix a few more scroll areas
This commit is contained in:
parent
59e898edeb
commit
c51fe65868
|
@ -177,7 +177,7 @@ export const MetricStylingApp: React.FC<{
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{segment === MetricStylingAppSegments.COLORS && (
|
{segment === MetricStylingAppSegments.COLORS && (
|
||||||
<StylingAppColors className="mb-12 px-4" colors={colors} />
|
<StylingAppColors className="px-4" colors={colors} />
|
||||||
)}
|
)}
|
||||||
</ScrollArea>
|
</ScrollArea>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -28,14 +28,12 @@ const options: SegmentedItem<ColorAppSegments>[] = [
|
||||||
|
|
||||||
export const ColorStyleSegments: React.FC<{
|
export const ColorStyleSegments: React.FC<{
|
||||||
setSelectedSegment: (value: ColorAppSegments) => void;
|
setSelectedSegment: (value: ColorAppSegments) => void;
|
||||||
initialSelectedSegment: ColorAppSegments;
|
selectedSegment: ColorAppSegments;
|
||||||
}> = React.memo(({ initialSelectedSegment, setSelectedSegment }) => {
|
}> = React.memo(({ selectedSegment, setSelectedSegment }) => {
|
||||||
const onChange = useMemoizedFn((value: SegmentedItem<ColorAppSegments>) => {
|
const onChange = useMemoizedFn((value: SegmentedItem<ColorAppSegments>) => {
|
||||||
setSelectedSegment(value.value);
|
setSelectedSegment(value.value);
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return <AppSegmented block options={options} value={selectedSegment} onChange={onChange} />;
|
||||||
<AppSegmented block options={options} value={initialSelectedSegment} onChange={onChange} />
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
ColorStyleSegments.displayName = 'PaletteSegments';
|
ColorStyleSegments.displayName = 'PaletteSegments';
|
||||||
|
|
|
@ -29,7 +29,7 @@ export const ColorsApp: React.FC<{
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col space-y-2">
|
<div className="flex flex-col space-y-2">
|
||||||
<ColorStyleSegments
|
<ColorStyleSegments
|
||||||
initialSelectedSegment={initialSelectedSegment}
|
selectedSegment={selectedSegment}
|
||||||
setSelectedSegment={setSelectedSegment}
|
setSelectedSegment={setSelectedSegment}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ import { ColorsApp } from './ColorsApp';
|
||||||
import { IBusterMetricChartConfig } from '@/api/asset_interfaces';
|
import { IBusterMetricChartConfig } from '@/api/asset_interfaces';
|
||||||
import { useMemoizedFn, useUnmount } from '@/hooks';
|
import { useMemoizedFn, useUnmount } from '@/hooks';
|
||||||
import { useUpdateMetricChart } from '@/context/Metrics';
|
import { useUpdateMetricChart } from '@/context/Metrics';
|
||||||
|
import { cn } from '@/lib/classMerge';
|
||||||
|
|
||||||
export const StylingAppColors: React.FC<{
|
export const StylingAppColors: React.FC<{
|
||||||
className: string;
|
className: string;
|
||||||
|
@ -27,7 +28,7 @@ export const StylingAppColors: React.FC<{
|
||||||
<SelectColorApp selectedTab={selectedTab} onChange={setSelectedTab} />
|
<SelectColorApp selectedTab={selectedTab} onChange={setSelectedTab} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={className}>
|
<div className={cn(className, 'mb-12')}>
|
||||||
<AnimatePresence mode="wait" initial={false}>
|
<AnimatePresence mode="wait" initial={false}>
|
||||||
<motion.div
|
<motion.div
|
||||||
key={selectedTab}
|
key={selectedTab}
|
||||||
|
|
Loading…
Reference in New Issue