refactor: adjust SliderComponent spacing and typography (#5836)
🐛 (sliderComponent/index.tsx): adjust styling to fix alignment issue with input element in SliderComponent
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
This commit is contained in:
parent
16448e4247
commit
c01452f890
1 changed files with 3 additions and 2 deletions
|
|
@ -199,13 +199,14 @@ export default function SliderComponent({
|
||||||
const ringClassInputClass = "ring-[1px] ring-slider-input-border";
|
const ringClassInputClass = "ring-[1px] ring-slider-input-border";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={cn("w-full rounded-lg", editNode && "mt-4")}>
|
<div className={cn("w-full rounded-lg", editNode && "mt-3")}>
|
||||||
<Case condition={!sliderButtons}>
|
<Case condition={!sliderButtons}>
|
||||||
<div className="noflow nowheel nopan nodelete nodrag flex items-center justify-end">
|
<div className="noflow nowheel nopan nodelete nodrag flex items-center justify-end">
|
||||||
<div
|
<div
|
||||||
className={clsx(
|
className={clsx(
|
||||||
"input-slider-text",
|
"input-slider-text",
|
||||||
(isGrabbing || isEditing) && ringClassInputClass,
|
(isGrabbing || isEditing) && ringClassInputClass,
|
||||||
|
editNode && "relative left-0.5",
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{isEditing ? (
|
{isEditing ? (
|
||||||
|
|
@ -215,7 +216,7 @@ export default function SliderComponent({
|
||||||
onChange={handleInputChange}
|
onChange={handleInputChange}
|
||||||
onBlur={handleInputBlur}
|
onBlur={handleInputBlur}
|
||||||
onKeyDown={handleKeyDown}
|
onKeyDown={handleKeyDown}
|
||||||
className="relative bottom-[1px] w-full cursor-text rounded-sm bg-transparent text-center font-mono text-[0.88rem] arrow-hide"
|
className="relative bottom-[1px] w-full cursor-text rounded-sm bg-transparent text-center font-mono text-sm arrow-hide"
|
||||||
autoFocus
|
autoFocus
|
||||||
data-testid="slider_input"
|
data-testid="slider_input"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue