Skip to content

Commit 219a786

Browse files
authored
Fix Add site button style (#1711)
1 parent 7858b1e commit 219a786

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

src/modules/add-site/components/add-site-legacy.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { speak } from '@wordpress/a11y';
33
import { sprintf } from '@wordpress/i18n';
44
import { useI18n } from '@wordpress/react-i18n';
55
import { FormEvent, useCallback, useEffect, useState } from 'react';
6-
import Button from 'src/components/button';
6+
import Button, { ButtonVariant } from 'src/components/button';
77
import DragAndDropOverlay from 'src/components/drag-and-drop-overlay';
88
import Modal from 'src/components/modal';
99
import { SiteForm } from 'src/components/site-form';
@@ -25,9 +25,15 @@ interface AddSiteProps {
2525
className?: string;
2626
showModal: boolean;
2727
setShowModal: ( showModal: boolean ) => void;
28+
variant?: ButtonVariant;
2829
}
2930

30-
export default function AddSite( { className, showModal, setShowModal }: AddSiteProps ) {
31+
export default function AddSite( {
32+
className,
33+
showModal,
34+
setShowModal,
35+
variant = 'outlined',
36+
}: AddSiteProps ) {
3137
const { __ } = useI18n();
3238
const [ nameSuggested, setNameSuggested ] = useState( false );
3339
const [ fileError, setFileError ] = useState( '' );
@@ -247,7 +253,7 @@ export default function AddSite( { className, showModal, setShowModal }: AddSite
247253
</Modal>
248254
) }
249255
<Button
250-
variant="outlined"
256+
variant={ variant }
251257
className={ className }
252258
onClick={ openModal }
253259
disabled={ isAnySiteProcessing }

src/modules/add-site/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ export default function AddSite( { className, variant = 'outlined' }: AddSitePro
334334
if ( ! enableBlueprints ) {
335335
return (
336336
<AddSiteLegacy
337+
variant={ variant }
337338
className={ className }
338339
showModal={ showModal }
339340
setShowModal={ setShowModal }

0 commit comments

Comments
 (0)