aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/atoms/forms
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-05-25 15:49:31 +0200
committerArmand Philippot <git@armandphilippot.com>2022-05-25 15:49:31 +0200
commit36d129414b696bd2a633d379cac1dff867f64413 (patch)
tree30097582a73e91025c653969a109c8c2e8a9f471 /src/components/atoms/forms
parent6e6e068c42a8da7e92ee1bc0a14d2c47012b0a65 (diff)
fix(settings): reduce font-size on small devices
With French translation, words are a little longer so I reduce the font size on small devices to avoid line breaking.
Diffstat (limited to 'src/components/atoms/forms')
-rw-r--r--src/components/atoms/forms/form.tsx10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/components/atoms/forms/form.tsx b/src/components/atoms/forms/form.tsx
index b819aea..3307153 100644
--- a/src/components/atoms/forms/form.tsx
+++ b/src/components/atoms/forms/form.tsx
@@ -23,6 +23,10 @@ export type FormProps = {
*/
grouped?: boolean;
/**
+ * If grouped, set additional classnames to the items wrapper.
+ */
+ itemsClassName?: string;
+ /**
* A callback function to execute on submit.
*/
onSubmit: () => void;
@@ -36,6 +40,7 @@ export type FormProps = {
const Form: FC<FormProps> = ({
children,
grouped = true,
+ itemsClassName = '',
onSubmit,
...props
}) => {
@@ -48,7 +53,10 @@ const Form: FC<FormProps> = ({
const getFormItems = (): JSX.Element[] => {
return arrayChildren.map((child, index) =>
grouped ? (
- <div key={`item-${index}`} className={styles.item}>
+ <div
+ key={`item-${index}`}
+ className={`${styles.item} ${itemsClassName}`}
+ >
{child}
</div>
) : (