feat: add context length
This commit is contained in:
@@ -48,7 +48,7 @@ const SealSlider: React.FC<SealSliderProps> = (props) => {
|
||||
props.onChange?.(newValue);
|
||||
};
|
||||
|
||||
const renderLabel = React.useMemo(() => {
|
||||
const renderLabel = () => {
|
||||
return (
|
||||
<span
|
||||
className="slider-label"
|
||||
@@ -70,13 +70,13 @@ const SealSlider: React.FC<SealSliderProps> = (props) => {
|
||||
)}
|
||||
</span>
|
||||
);
|
||||
}, [label, labelWidth, description, value, max, min, step, defaultValue]);
|
||||
};
|
||||
return (
|
||||
<SliderWrapper className="slider-wrapper">
|
||||
<Wrapper
|
||||
required={required}
|
||||
status={checkStatus || status}
|
||||
label={renderLabel}
|
||||
label={renderLabel()}
|
||||
isFocus={true}
|
||||
variant="borderless"
|
||||
>
|
||||
|
||||
@@ -175,7 +175,7 @@ const SimpleSelect: React.FC<SelectProps & { ref?: any; showTags?: boolean }> =
|
||||
|
||||
return (
|
||||
<TagWrapper
|
||||
bordered={false}
|
||||
variant="filled"
|
||||
closable={props.closable}
|
||||
onClose={props.onClose}
|
||||
style={{
|
||||
|
||||
@@ -231,7 +231,12 @@ const Wrapper: FC<WrapperProps> = ({
|
||||
onClick={onClick}
|
||||
>
|
||||
{label && (
|
||||
<Label $isFocus={isFocus} $hasPrefix={hasPrefix} onClick={onClick}>
|
||||
<Label
|
||||
$isFocus={isFocus}
|
||||
$hasPrefix={hasPrefix}
|
||||
onClick={onClick}
|
||||
className="label-wrapper"
|
||||
>
|
||||
<LabelInfo
|
||||
label={label}
|
||||
required={required}
|
||||
|
||||
@@ -6,6 +6,9 @@ const SliderWrapper = styled.div`
|
||||
height: 100%;
|
||||
justify-content: center;
|
||||
}
|
||||
.label-wrapper {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.borderless {
|
||||
background-color: transparent;
|
||||
@@ -38,7 +41,7 @@ const SliderWrapper = styled.div`
|
||||
.label-val {
|
||||
position: absolute !important;
|
||||
top: -14px;
|
||||
right: -10px;
|
||||
right: 0px;
|
||||
width: 80px;
|
||||
border-radius: var(--border-radius-base);
|
||||
text-align: center;
|
||||
|
||||
Reference in New Issue
Block a user