refactor: playground params container

This commit is contained in:
jialin
2026-03-17 16:35:55 +08:00
committed by jialin
parent 68519223fa
commit 64955c26a7
16 changed files with 199 additions and 434 deletions
@@ -0,0 +1,6 @@
.wrapper {
overflow-y: auto;
width: 100%;
padding-inline-start: 8px;
padding-inline-end: 8px;
}
+6 -14
View File
@@ -2,15 +2,9 @@ import useOverlayScroller, {
OverlayScrollerOptions
} from '@/hooks/use-overlay-scroller';
import { Tooltip, TooltipProps } from 'antd';
import classNames from 'classnames';
import React from 'react';
import styled from 'styled-components';
const Wrapper = styled.div<{ $maxHeight?: number }>`
max-height: ${({ $maxHeight }) =>
typeof $maxHeight === 'number' ? `${$maxHeight}px` : $maxHeight};
overflow-y: auto;
width: 100%;
`;
import s from './index.module.less';
// export OverlayScrollerOptions
export type { OverlayScrollerOptions };
@@ -49,22 +43,20 @@ export const OverlayScroller: React.FC<
}, []);
return (
<Wrapper
<div
ref={scroller}
data-overlayscrollbars-initialize
className="overlay-scroller-wrapper"
$maxHeight={maxHeight || 200}
className={classNames(s.wrapper, 'overlay-scroller-wrapper')}
hidden={false}
onWheel={onScroll}
style={{
paddingInlineStart: 8,
paddingInlineEnd: 8,
maxHeight: maxHeight || 200,
...style,
...styles?.wrapper
}}
>
{children}
</Wrapper>
</div>
);
};
+1 -1
View File
@@ -171,7 +171,7 @@ const InputWrapper = styled.div`
}
.seal-textarea-wrapper {
height: auto;
padding-right: 10px;
padding-right: 4px;
textarea {
overflow-y: auto !important;
}