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 && (
|
||||
<StylingAppColors className="mb-12 px-4" colors={colors} />
|
||||
<StylingAppColors className="px-4" colors={colors} />
|
||||
)}
|
||||
</ScrollArea>
|
||||
</div>
|
||||
|
|
|
@ -28,14 +28,12 @@ const options: SegmentedItem<ColorAppSegments>[] = [
|
|||
|
||||
export const ColorStyleSegments: React.FC<{
|
||||
setSelectedSegment: (value: ColorAppSegments) => void;
|
||||
initialSelectedSegment: ColorAppSegments;
|
||||
}> = React.memo(({ initialSelectedSegment, setSelectedSegment }) => {
|
||||
selectedSegment: ColorAppSegments;
|
||||
}> = React.memo(({ selectedSegment, setSelectedSegment }) => {
|
||||
const onChange = useMemoizedFn((value: SegmentedItem<ColorAppSegments>) => {
|
||||
setSelectedSegment(value.value);
|
||||
});
|
||||
|
||||
return (
|
||||
<AppSegmented block options={options} value={initialSelectedSegment} onChange={onChange} />
|
||||
);
|
||||
return <AppSegmented block options={options} value={selectedSegment} onChange={onChange} />;
|
||||
});
|
||||
ColorStyleSegments.displayName = 'PaletteSegments';
|
||||
|
|
|
@ -29,7 +29,7 @@ export const ColorsApp: React.FC<{
|
|||
return (
|
||||
<div className="flex flex-col space-y-2">
|
||||
<ColorStyleSegments
|
||||
initialSelectedSegment={initialSelectedSegment}
|
||||
selectedSegment={selectedSegment}
|
||||
setSelectedSegment={setSelectedSegment}
|
||||
/>
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ import { ColorsApp } from './ColorsApp';
|
|||
import { IBusterMetricChartConfig } from '@/api/asset_interfaces';
|
||||
import { useMemoizedFn, useUnmount } from '@/hooks';
|
||||
import { useUpdateMetricChart } from '@/context/Metrics';
|
||||
import { cn } from '@/lib/classMerge';
|
||||
|
||||
export const StylingAppColors: React.FC<{
|
||||
className: string;
|
||||
|
@ -27,7 +28,7 @@ export const StylingAppColors: React.FC<{
|
|||
<SelectColorApp selectedTab={selectedTab} onChange={setSelectedTab} />
|
||||
</div>
|
||||
|
||||
<div className={className}>
|
||||
<div className={cn(className, 'mb-12')}>
|
||||
<AnimatePresence mode="wait" initial={false}>
|
||||
<motion.div
|
||||
key={selectedTab}
|
||||
|
|
Loading…
Reference in New Issue