From a263c1633e40e586e6eeb344475caa4572a3b4ea Mon Sep 17 00:00:00 2001 From: Erica Norris Date: Thu, 17 Dec 2020 11:31:19 -0800 Subject: [PATCH 1/5] update Callout primary/secondaryLink to be primary/secondaryButton --- docs/src/Callout.doc.js | 123 ++++++++++++++++++++++++++++++-- packages/gestalt/src/Callout.js | 85 ++++++++++++++-------- 2 files changed, 173 insertions(+), 35 deletions(-) diff --git a/docs/src/Callout.doc.js b/docs/src/Callout.doc.js index b525c6fb09..db9a683c4b 100644 --- a/docs/src/Callout.doc.js +++ b/docs/src/Callout.doc.js @@ -52,9 +52,9 @@ card( href: '', }, { - name: 'primaryLink', + name: 'primaryButton', type: - '{| accessibilityLabel?: string , href: string, label: string, onClick?: ({ event: SyntheticMouseEvent | SyntheticKeyboardEvent | SyntheticKeyboardEvent }) => void |}', + '{| accessibilityLabel?: string , href: string, label: string, role: "link" | "button", onClick?: ({ event: SyntheticMouseEvent | SyntheticKeyboardEvent | SyntheticKeyboardEvent }) => void |}', required: false, defaultValue: null, description: [ @@ -67,9 +67,9 @@ card( href: '', }, { - name: 'secondaryLink', + name: 'secondaryButton', type: - '{| accessibilityLabel?: string , href: string, label: string, onClick?: ({ event: SyntheticMouseEvent | SyntheticKeyboardEvent | SyntheticKeyboardEvent }) => void |}', + '{| accessibilityLabel?: string , href: string, label: string, role: "link" | "button", onClick?: ({ event: SyntheticMouseEvent | SyntheticKeyboardEvent | SyntheticKeyboardEvent }) => void |}', required: false, defaultValue: null, description: [ @@ -117,8 +117,8 @@ card( iconAccessibilityLabel="Info icon" title="Your business account was created!" message="Apply to the Verified Merchant Program!" - primaryLink={{href: "https://pinterest.com", label:"Get started"}} - secondaryLink={{href: "https://pinterest.com", label:"Learn more"}} + primaryButton={{href: "https://pinterest.com", label:"Get started", role: "link"}} + secondaryButton={{href: "https://pinterest.com", label:"Learn more", role: "link"}} dismissButton={{ accessibilityLabel: 'Dismiss banner', onDismiss: ()=>{}, @@ -136,7 +136,7 @@ card( type="warning" iconAccessibilityLabel="Warning icon" message="This feature will be removed in two weeks." - primaryLink={{href: "https://pinterest.com", label:"Learn more"}} + primaryButton={{href: "https://pinterest.com", label:"Learn more", role: "link"}} dismissButton={{ accessibilityLabel: 'Dismiss banner', onDismiss: ()=>{}, @@ -159,4 +159,113 @@ card( /> ); +card( + + { setShowModal(!showModal) } + }} + dismissButton={{ + accessibilityLabel: 'Dismiss banner', + onDismiss: ()=>{}, + }} + /> + {showModal && ( + + { setShowModal(!showModal) }} + footer={ + + +