Skip to content

Commit

Permalink
Fixes #231
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta committed Sep 13, 2024
1 parent 3553fd7 commit a4de860
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
7 changes: 5 additions & 2 deletions client/src/components/InputField.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export default function InputField({
link = null,
externalLink = false,
large = false,
small = false,
noInput = false,
error = false,
cols = 5,
Expand Down Expand Up @@ -68,13 +69,15 @@ export default function InputField({
onChange={onChange}
onBlur={onBlur}
id={name}
className={`${className} sds--text-area ${large ? "large" : ""}`}

className={`${className} sds--text-area ${large ? "large" : ""} ${small ? "small" : ""}`}
onKeyDown={e => {
if (onEnter && e.keyCode === 13) {//enter
onEnter(e);
}
}}
placeholder={placeholder} cols={cols}/>}
placeholder={placeholder}
cols={cols}/>}
{button && button}
{copyClipBoard && <ClipBoardCopy txt={value} right={true} input={true}/>}
{link && <div className="input-field-link" onClick={() => navigate(link)}>
Expand Down
4 changes: 4 additions & 0 deletions client/src/components/InputField.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
textarea {
height: 90px;

&.small {
height: 51px;
}

&.large {
height: 170px;
}
Expand Down
3 changes: 2 additions & 1 deletion client/src/pages/InvitationForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@ export const InvitationForm = () => {
value={invitation.message}
onChange={e => setInvitation({...invitation, message: e.target.value})}
placeholder={I18n.t("invitations.messagePlaceholder")}
large={true}
small={true}
cols={1}
multiline={true}/>

<SelectField
Expand Down

0 comments on commit a4de860

Please sign in to comment.