From 0b3146f7278929c4d1b33dd8f94f34e351e5e5a9 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Fri, 8 Apr 2022 22:36:24 +0200 Subject: chore: add a Settings modal component --- src/components/molecules/forms/motion-toggle.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/components/molecules/forms/motion-toggle.tsx') diff --git a/src/components/molecules/forms/motion-toggle.tsx b/src/components/molecules/forms/motion-toggle.tsx index 77291ed..d4f7d11 100644 --- a/src/components/molecules/forms/motion-toggle.tsx +++ b/src/components/molecules/forms/motion-toggle.tsx @@ -2,17 +2,17 @@ import Toggle, { ToggleChoices, ToggleProps, } from '@components/atoms/forms/toggle'; -import { FC, useState } from 'react'; +import { useState, VFC } from 'react'; import { useIntl } from 'react-intl'; -export type MotionToggleProps = Pick; +export type MotionToggleProps = Pick; /** * MotionToggle component * * Render a Toggle component to set reduce motion. */ -const MotionToggle: FC = ({ value }) => { +const MotionToggle: VFC = ({ value, ...props }) => { const intl = useIntl(); const [isDeactivated, setIsDeactivated] = useState(value); const reduceMotionLabel = intl.formatMessage({ @@ -40,9 +40,11 @@ const MotionToggle: FC = ({ value }) => { id="reduce-motion-settings" name="reduce-motion-settings" label={reduceMotionLabel} + labelSize="medium" choices={reduceMotionChoices} value={isDeactivated} setValue={setIsDeactivated} + {...props} /> ); }; -- cgit v1.2.3