Skip to content

Commit

Permalink
Anchor.fm: Fix css rules that break after removing Anchor from stepper (
Browse files Browse the repository at this point in the history
#79295)

* add className to SetupForm

* add placeholder text color

---------

Co-authored-by: Andrés Blanco <email@gmail.com>
  • Loading branch information
andres-blanco and Andrés Blanco authored Jul 18, 2023
1 parent eff9562 commit 8027883
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
import { Button, FormInputValidation } from '@automattic/components';
import { TextControl } from '@wordpress/components';
import { useI18n } from '@wordpress/react-i18n';
import classnames from 'classnames';
import { Dispatch, FormEvent, ReactNode, SetStateAction, useEffect } from 'react';
import { ForwardedAutoresizingFormTextarea } from 'calypso/blocks/comments/autoresizing-form-textarea';
import FormFieldset from 'calypso/components/forms/form-fieldset';
import FormLabel from 'calypso/components/forms/form-label';
import { SiteIconWithPicker } from 'calypso/components/site-icon-with-picker';
import { useSiteSlugParam } from 'calypso/landing/stepper/hooks/use-site-slug-param';
import type { SiteDetails } from '@automattic/data-stores';

import './style.scss';

interface TranslatedStrings {
Expand All @@ -36,6 +36,7 @@ interface SetupFormProps {
translatedText?: TranslatedStrings;
isLoading?: boolean;
isSubmitError?: boolean;
className?: string;
children?: ReactNode;
}

Expand All @@ -54,6 +55,7 @@ const SetupForm = ( {
translatedText,
isLoading = false,
isSubmitError = false,
className = '',
children,
}: SetupFormProps ) => {
const { __ } = useI18n();
Expand All @@ -73,8 +75,9 @@ const SetupForm = ( {
}
}, [ siteTitle, invalidSiteTitle, setInvalidSiteTitle ] );

const formClasses = classnames( 'setup-form__form', className );
return (
<form className="setup-form__form" onSubmit={ handleSubmit }>
<form className={ formClasses } onSubmit={ handleSubmit }>
<SiteIconWithPicker
site={ site }
placeholderText={ translatedText?.iconPlaceholder || __( 'Upload a profile image' ) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ const NewsletterPostSetup: Step = ( { navigation } ) => {
translatedText={ newsletterFormText }
isLoading={ isLoading }
isSubmitError={ isSubmitError }
className="newsletter-setup-form"
/>
}
recordTracksEvent={ recordTracksEvent }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ const NewsletterSetup: Step = ( { navigation } ) => {
setBase64Image={ setBase64Image }
handleSubmit={ handleSubmit }
translatedText={ newsletterFormText }
className="newsletter-setup-form"
/>
}
recordTracksEvent={ recordTracksEvent }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,27 @@
margin-top: -2px;
}
}

.newsletter-setup-form {
textarea,
pre {
color: var(--studio-gray-100);
font-size: $font-body-small;
padding: 12px 16px;
}

textarea {
font-family: "SF Pro Text", $sans;
font-weight: 400;

&::placeholder {
color: var(--studio-gray-30);
}
}

pre {
border: none;
line-height: 20px;
}
}
}

0 comments on commit 8027883

Please sign in to comment.