aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/organisms/forms
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-05-16 19:40:23 +0200
committerArmand Philippot <git@armandphilippot.com>2022-05-16 19:40:23 +0200
commitc77c58e18143233be042c4980a6ed08ae9beac52 (patch)
tree94f7d828571a86470ae299fff7dffd32fb38de7c /src/components/organisms/forms
parent2155550fa36a3bc3c8f66e0926530123b4018cd4 (diff)
chore: adjust and complete missing styles
* add logo to topics pages and links * add Prism styles to articles * and a few other adjustements
Diffstat (limited to 'src/components/organisms/forms')
-rw-r--r--src/components/organisms/forms/comment-form.tsx12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/components/organisms/forms/comment-form.tsx b/src/components/organisms/forms/comment-form.tsx
index 9e0abdf..5ff4ea4 100644
--- a/src/components/organisms/forms/comment-form.tsx
+++ b/src/components/organisms/forms/comment-form.tsx
@@ -1,5 +1,5 @@
import Button from '@components/atoms/buttons/button';
-import Form from '@components/atoms/forms/form';
+import Form, { type FormProps } from '@components/atoms/forms/form';
import Heading, { type HeadingLevel } from '@components/atoms/headings/heading';
import Spinner from '@components/atoms/loaders/spinner';
import LabelledField from '@components/molecules/forms/labelled-field';
@@ -15,11 +15,7 @@ export type CommentFormData = {
website?: string;
};
-export type CommentFormProps = {
- /**
- * Set additional classnames to the form wrapper.
- */
- className?: string;
+export type CommentFormProps = Pick<FormProps, 'className'> & {
/**
* Pass a component to print a success/error message.
*/
@@ -44,12 +40,12 @@ export type CommentFormProps = {
};
const CommentForm: FC<CommentFormProps> = ({
- className = '',
Notice,
parentId,
saveComment,
title,
titleLevel = 2,
+ ...props
}) => {
const intl = useIntl();
const [name, setName] = useState<string>('');
@@ -116,9 +112,9 @@ const CommentForm: FC<CommentFormProps> = ({
return (
<Form
onSubmit={submitHandler}
- className={className}
aria-label={formAriaLabel}
aria-labelledby={formLabelledBy}
+ {...props}
>
{title && (
<Heading id={formId} level={titleLevel}>