Name | Type | Default | Description |
---|---|---|---|
className | string |
| Additional CSS classes. |
displayText | string |
| The text to be displayed. |
ref | Ref<HTMLAnchorElement | HTMLSpanElement> |
| Ref for the wrapping element. |
value | string |
| Phone number, no 'tel:' scheme, '+18887342669' |
variant | 'link' | 'text' | "link"
| Controls styling of the field. |
PhoneDisplay
The PhoneDisplay component renders a phone number as either a Link that will open a user's preferred telecommunication application, or as plain Text.
For more information on how to use the features and props for this component, check out the developer documentation.
Usage
The value passed to the PhoneDisplay component should be a formatted phone number in order to guarantee flawless intergration if a user were to click on the PhoneDisplay when it's set as a link variant.
If no displayText is provided, the display will default to the value given. The component displays "--" in the case of an undefined value.