From 047c50cc02372d741d41e08153c3d7f7db8df129 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 6 May 2022 18:05:34 -0500 Subject: [PATCH] Captcha: improve styles --- .../auth_login/components/captcha.tsx | 48 ++++++++++++------- 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/app/soapbox/features/auth_login/components/captcha.tsx b/app/soapbox/features/auth_login/components/captcha.tsx index c45010dac..ea9f1e3a1 100644 --- a/app/soapbox/features/auth_login/components/captcha.tsx +++ b/app/soapbox/features/auth_login/components/captcha.tsx @@ -1,13 +1,17 @@ import { Map as ImmutableMap } from 'immutable'; import React, { useState, useEffect } from 'react'; -import { FormattedMessage } from 'react-intl'; +import { useIntl, defineMessages, FormattedMessage } from 'react-intl'; import { fetchCaptcha } from 'soapbox/actions/auth'; -import { TextInput } from 'soapbox/features/forms'; +import { Text, Input } from 'soapbox/components/ui'; import { useAppDispatch } from 'soapbox/hooks'; const noOp = () => {}; +const messages = defineMessages({ + placeholder: { id: 'registration.captcha.placeholder', defaultMessage: 'Enter the pictured text' }, +}); + interface ICaptchaField { name?: string, value: string, @@ -71,7 +75,9 @@ const CaptchaField: React.FC = ({ case 'native': return (
-

{}

+ + + = ({ captcha, onChange, onClick, name, value }) => ( -
- captcha - -
-); +const NativeCaptchaField: React.FC = ({ captcha, onChange, onClick, name, value }) => { + const intl = useIntl(); + + return ( +
+ captcha + + +
+ ); +}; export { CaptchaField as default,