Skip to content

Commit 78719e5

Browse files
authored
Merge pull request #41 from ccswbs/tq-iss40
Fix phone extension logic in Contact component
2 parents fd35303 + 5184758 commit 78719e5

File tree

6 files changed

+30
-7
lines changed

6 files changed

+30
-7
lines changed

.changeset/all-ads-walk.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@uoguelph/react-components': patch
3+
---
4+
5+
Refactor phone extension handling

.changeset/pre.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"mode": "pre",
3+
"tag": "rc",
4+
"initialVersions": {
5+
"@uoguelph/react-components": "1.7.0",
6+
"@uoguelph/storybook": "1.0.1",
7+
"@uoguelph/tailwind-theme": "1.0.2",
8+
"@uoguelph/web-components": "2.0.10"
9+
},
10+
"changesets": [
11+
"all-ads-walk"
12+
]
13+
}

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/react-components/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @uoguelph/react-components
22

3+
## 1.7.1-rc.0
4+
5+
### Patch Changes
6+
7+
- 52d524f: Refactor phone extension handling
8+
39
## 1.7.0
410

511
### Minor Changes

packages/react-components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@uoguelph/react-components",
3-
"version": "1.7.0",
3+
"version": "1.7.1-rc.0",
44
"description": "University of Guelph React Components Library",
55
"type": "module",
66
"scripts": {

packages/react-components/src/components/contact/contact-phone.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,9 @@ export function ContactPhone({ number, extension, className }: ContactPhoneProps
2626
return (
2727
<div className={`uofg-contact-phone-container ${twMerge(container(), className)}`}>
2828
<FontAwesomeIcon icon={faPhone} className="uofg-contact-phone-icon" />
29-
<a className={`uofg-contact-phone ${link()}`} href={`tel:${number}`}>
30-
{number}
29+
<a className={`uofg-contact-phone ${link()}`} href={`tel:${number}${extension ? `;${extension}` : ''}`}>
30+
{number}{extension && <span className="uofg-contact-phone-extension"> - Ext. {extension}</span>}
3131
</a>
32-
{extension && <span className="uofg-contact-phone-extension"> - Ext. {extension}</span>}
3332
</div>
3433
);
3534
}

0 commit comments

Comments
 (0)