Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Update EuiConfirmModal examples #6519

Merged
merged 3 commits into from
Jan 12, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions src-docs/src/views/button/guidelines.js
Original file line number Diff line number Diff line change
Expand Up @@ -541,14 +541,6 @@ export default () => (
<EuiTableHeaderCell>Use this instead</EuiTableHeaderCell>
</EuiTableHeader>
<EuiTableBody>
<EuiTableRow>
<EuiTableRowCell>
<EuiButton color="danger">Discard</EuiButton>
</EuiTableRowCell>

<EuiTableRowCell>Remove or Delete</EuiTableRowCell>
</EuiTableRow>

<EuiTableRow>
<EuiTableRowCell>
<EuiButton>New</EuiButton>
Expand Down
24 changes: 14 additions & 10 deletions src-docs/src/views/modal/confirm_modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,20 @@ export default () => {
if (isModalVisible) {
modal = (
<EuiConfirmModal
title="Do this thing"
style={{ width: 600 }}
title="Update subscription to Platinum?"
onCancel={closeModal}
onConfirm={closeModal}
cancelButtonText="No, don't do it"
confirmButtonText="Yes, do it"
cancelButtonText="Cancel"
confirmButtonText="Update subscription"
defaultFocusedButton="confirm"
>
<p>You&rsquo;re about to do something.</p>
<p>Are you sure you want to do this?</p>
<p>
Your subscription and benefits increase immediately. If you change to
a lower subscription later, it will not take affect until the next
billing cycle.
</p>
<p>Do you want to continue?</p>
elizabetdev marked this conversation as resolved.
Show resolved Hide resolved
</EuiConfirmModal>
);
}
Expand All @@ -40,16 +45,15 @@ export default () => {
if (isDestroyModalVisible) {
destroyModal = (
<EuiConfirmModal
title="Do this destructive thing"
title="Discard dashboard changes?"
onCancel={closeDestroyModal}
onConfirm={closeDestroyModal}
cancelButtonText="No, don't do it"
confirmButtonText="Yes, do it"
cancelButtonText="Keep editing"
confirmButtonText="Discard changes"
buttonColor="danger"
defaultFocusedButton="confirm"
>
<p>You&rsquo;re about to destroy something.</p>
<p>Are you sure you want to do this?</p>
<p>You will lose all unsaved changes made to this dashboard.</p>
</EuiConfirmModal>
);
}
Expand Down