-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Link for emails in contact details pattern (#4197)
Co-authored-by: Yun <[email protected]>
- Loading branch information
1 parent
cba7395
commit 70a5b46
Showing
13 changed files
with
31 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ import { | |
type DropdownProps, | ||
FlexLayout, | ||
FlowLayout, | ||
Link, | ||
Option, | ||
SplitLayout, | ||
StackLayout, | ||
|
@@ -53,7 +54,9 @@ const basicContact = { | |
}, | ||
{ | ||
label: "Email", | ||
value: "[email protected]", | ||
value: ( | ||
<Link href="mailto:[email protected]">[email protected]</Link> | ||
), | ||
icon: <MessageIcon aria-hidden />, | ||
}, | ||
], | ||
|
@@ -86,7 +89,7 @@ export const ContactDetails = ({ avatarSrc = persona }) => { | |
<StackLayout gap={0.5} direction={"column"}> | ||
{basicContact.metadata.map((metadata) => { | ||
return ( | ||
<Text variant="secondary" key={metadata.label}> | ||
<Text color="secondary" key={metadata.label}> | ||
{metadata.label} | ||
</Text> | ||
); | ||
|
@@ -182,7 +185,7 @@ export const QuickAction = () => { | |
hideIcon | ||
> | ||
<Button | ||
variant="secondary" | ||
appearance="transparent" | ||
aria-label={`Email ${basicContact.primary}`} | ||
> | ||
<MessageIcon aria-hidden /> | ||
|
@@ -194,7 +197,7 @@ export const QuickAction = () => { | |
hideIcon | ||
> | ||
<Button | ||
variant="secondary" | ||
appearance="transparent" | ||
aria-label={`Call ${basicContact.primary}`} | ||
> | ||
<CallIcon aria-hidden /> | ||
|
@@ -206,7 +209,7 @@ export const QuickAction = () => { | |
hideIcon | ||
> | ||
<Button | ||
variant="secondary" | ||
appearance="transparent" | ||
aria-label={`Text ${basicContact.primary}`} | ||
> | ||
<ChatIcon aria-hidden /> | ||
|
@@ -249,7 +252,7 @@ export const CollapsibleDetails = () => { | |
hideIcon | ||
> | ||
<Button | ||
variant="secondary" | ||
appearance="transparent" | ||
aria-label={`Email ${basicContact.primary}`} | ||
> | ||
<MessageIcon aria-hidden /> | ||
|
@@ -261,7 +264,7 @@ export const CollapsibleDetails = () => { | |
hideIcon | ||
> | ||
<Button | ||
variant="secondary" | ||
appearance="transparent" | ||
aria-label={`Call ${basicContact.primary}`} | ||
> | ||
<CallIcon aria-hidden /> | ||
|
@@ -273,7 +276,7 @@ export const CollapsibleDetails = () => { | |
hideIcon | ||
> | ||
<Button | ||
variant="secondary" | ||
appearance="transparent" | ||
aria-label={`Text ${basicContact.primary}`} | ||
> | ||
<ChatIcon aria-hidden /> | ||
|
@@ -284,7 +287,7 @@ export const CollapsibleDetails = () => { | |
endItem={ | ||
<Button | ||
onClick={handleClick} | ||
variant="secondary" | ||
appearance="transparent" | ||
aria-expanded={expandedDetails} | ||
aria-label={"expand contact details"} | ||
> | ||
|
@@ -310,7 +313,7 @@ export const CollapsibleDetails = () => { | |
<StackLayout direction={"column"} gap={0.5}> | ||
{basicContact.metadata.map((metadata) => { | ||
return ( | ||
<Text variant="secondary" key={metadata.label}> | ||
<Text color="secondary" key={metadata.label}> | ||
{metadata.label} | ||
</Text> | ||
); | ||
|
@@ -385,17 +388,14 @@ export const List = () => { | |
valueToString={(contact) => contact.primary} | ||
> | ||
{contactList.map((contact) => ( | ||
<Option key={contact.sid} value={contact}> | ||
<StackLayout | ||
direction={"row"} | ||
gap={1} | ||
style={{ | ||
paddingLeft: "var(--salt-spacing-100)", | ||
paddingRight: "var(--salt-spacing-100)", | ||
paddingTop: "var(--salt-spacing-50)", | ||
paddingBottom: "var(--salt-spacing-50)", | ||
}} | ||
> | ||
<Option | ||
key={contact.sid} | ||
value={contact} | ||
style={{ | ||
padding: "var(--salt-spacing-50) var(--salt-spacing-100)", | ||
}} | ||
> | ||
<StackLayout direction={"row"} align="center" gap={1}> | ||
<Avatar | ||
src={contact.avatarImage as string} | ||
aria-label={basicContact.primary} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+176 Bytes
(100%)
site/public/img/patterns/contact-details/contact-details-actions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+467 Bytes
(100%)
site/public/img/patterns/contact-details/contact-details-anatomy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+29 Bytes
(100%)
site/public/img/patterns/contact-details/contact-details-card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+232 Bytes
(100%)
site/public/img/patterns/contact-details/contact-details-collapsible-layout.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+237 Bytes
(100%)
site/public/img/patterns/contact-details/contact-details-collapsible-spacing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+202 Bytes
(100%)
site/public/img/patterns/contact-details/contact-details-icons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+53 Bytes
(100%)
site/public/img/patterns/contact-details/contact-details-layout-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+349 Bytes
(100%)
site/public/img/patterns/contact-details/contact-details-layout-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+16 Bytes
(100%)
site/public/img/patterns/contact-details/contact-details-layout-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+187 Bytes
(100%)
site/public/img/patterns/contact-details/contact-details-using-links.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+206 Bytes
(100%)
site/public/img/patterns/contact-details/contact-details.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.