Skip to content

Commit

Permalink
change: textarea, formgroup
Browse files Browse the repository at this point in the history
  • Loading branch information
daniele-mng committed Nov 28, 2024
1 parent f85c93b commit 63cfd3f
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 6 deletions.
59 changes: 55 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"node": ">=18.0"
},
"dependencies": {
"@greenbone/opensight-ui-components-mantinev7": "^0.0.5-alpha7",
"@greenbone/opensight-ui-components-mantinev7": "^0.0.6",
"@mantine/core": "^7.12.1",
"@reduxjs/toolkit": "^2.3.0",
"@sentry/react": "^8.39.0",
Expand Down Expand Up @@ -65,6 +65,7 @@
"react-dom": "^18.3.1",
"react-i18next": "^15.1.1",
"react-redux": "^9.1.2",
"react-rnd": "^10.4.13",
"react-router-dom": "^6.28.0",
"redux": "^5.0.1",
"redux-logger": "^3.0.6",
Expand Down
3 changes: 2 additions & 1 deletion src/web/components/form/formgroup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const FormGroup = ({
<Column
align="stretch"
justify="flex-start"
gap="0"
gap="8"
data-testid={dataTestId}
>
{isDefined(title) && <Label>{title}</Label>}
Expand All @@ -36,6 +36,7 @@ const FormGroup = ({
};

FormGroup.propTypes = {
children: PropTypes.node,
'data-testid': PropTypes.string,
direction: PropTypes.oneOf(['row', 'column']),
gap: PropTypes.string,
Expand Down
7 changes: 7 additions & 0 deletions src/web/components/form/textarea.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ const TextArea = ({
placeholder,
title,
value,
classNames,
...props
}) => {
const handleChange = useValueChange({disabled, name, onChange});

return (
<GreenboneTextArea
{...props}
Expand All @@ -40,6 +42,10 @@ const TextArea = ({
value={value}
placeholder={placeholder}
onChange={handleChange}
classNames={{
input: `default-input-class ${classNames?.input || ''}`,
}}
resize="vertical"
/>
);
};
Expand All @@ -55,6 +61,7 @@ TextArea.propTypes = {
title: PropTypes.string,
value: PropTypes.string,
onChange: PropTypes.func,
classNames: PropTypes.object,
};

export default TextArea;
Expand Down

0 comments on commit 63cfd3f

Please sign in to comment.