Skip to content

Commit

Permalink
fix(lnf): add af-form__label-container div and remove margin from sty…
Browse files Browse the repository at this point in the history
…le (#752)

* fix(lnf): add af-form__label-container div and remove margin from style

* fix(lnf): change div render condition
  • Loading branch information
a-pourrier authored Jan 20, 2025
1 parent ffe7751 commit a8ebe87
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 16 deletions.
1 change: 0 additions & 1 deletion client/look-and-feel/css/src/Form/TextArea/TextArea.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
.af-form__input-textarea {
width: 100%;
height: common.rem(142);
margin-top: 0.5rem;
padding: 1rem 2.5rem 1rem 1rem;
border: 1px solid var(--color-gray);
border-radius: var(--default-border-radius);
Expand Down
34 changes: 19 additions & 15 deletions client/look-and-feel/react/src/Form/TextArea/TextArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,25 @@ const TextArea = forwardRef<HTMLTextAreaElement, Props>(

return (
<div className="af-form__input-container">
<label htmlFor={inputId} className="af-form__input-label">
{label} {required && <span> *</span>}
</label>
{description && (
<span className="af-form__input-description">{description}</span>
)}
{buttonLabel && (
<Button
className="af-form__input-more"
variant={Variants.ghost}
iconLeft={<Svg src={infoIcon} />}
onClick={onButtonClick}
>
{buttonLabel}
</Button>
{label && (
<div className="af-form__label-container">
<label htmlFor={inputId} className="af-form__input-label">
{label} {required && <span> *</span>}
</label>
{description && (
<span className="af-form__input-description">{description}</span>
)}
{buttonLabel && (
<Button
className="af-form__input-more"
variant={Variants.ghost}
iconLeft={<Svg src={infoIcon} />}
onClick={onButtonClick}
>
{buttonLabel}
</Button>
)}
</div>
)}
<textarea
id={inputId}
Expand Down

0 comments on commit a8ebe87

Please sign in to comment.