Skip to content

Commit

Permalink
Use Core Modal and Button component styles (#96267)
Browse files Browse the repository at this point in the history
  • Loading branch information
candy02058912 authored Nov 14, 2024
1 parent ecc4164 commit 288ee60
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Button } from '@automattic/components';
import styled from '@emotion/styled';
import { Modal } from '@wordpress/components';
import { Modal, Button } from '@wordpress/components';
import { translate } from 'i18n-calypso';

const ActionButtons = styled.div( {
Expand All @@ -23,22 +22,19 @@ export function LaunchConfirmationModal( {
const modalTitle = translate( "You're about to launch this website" );

return (
<Modal
className="site-settings__launch-confirmation-modal"
title={ modalTitle }
onRequestClose={ closeModal }
>
<Modal title={ modalTitle } onRequestClose={ closeModal } size="medium">
{ message && <p>{ message }</p> }
<p>{ translate( 'Ready to launch?' ) }</p>
<ActionButtons>
<Button
variant="secondary"
onClick={ () => {
closeModal();
} }
>
{ translate( 'Cancel' ) }
</Button>
<Button primary onClick={ onConfirmation }>
<Button variant="primary" onClick={ onConfirmation }>
{ translate( 'Launch site' ) }
</Button>
</ActionButtons>
Expand Down
3 changes: 0 additions & 3 deletions client/sites/settings/site/visibility/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,3 @@
white-space: nowrap;
}

.site-settings__launch-confirmation-modal {
max-width: 60%;
}

0 comments on commit 288ee60

Please sign in to comment.