Skip to content

Commit

Permalink
Merge pull request #964 from NordicSemiconductor/default_label_for_links
Browse files Browse the repository at this point in the history
ExternalLink: Use `href` as default for `label`
  • Loading branch information
datenreisender authored Jan 13, 2025
2 parents aa1e453 + 2dda5bb commit 7afbece
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ This project does _not_ adhere to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html) but contrary to it
every new version is a new major version.

## 196.0.0 - 2025-01-13

### Changed

- `ExternalLink`: The `label` prop now defaults to the value of `href`.

## 195.0.0 - 2025-01-09

### Added
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nordicsemiconductor/pc-nrfconnect-shared",
"version": "195.0.0",
"version": "196.0.0",
"description": "Shared commodities for developing pc-nrfconnect-* packages",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/Link/ExternalLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import React from 'react';

import classNames from '../utils/classNames';

export default ({ label, href }: { label: string; href: string }) => (
export default ({ href, label = href }: { href: string; label?: string }) => (
<a
target="_blank"
rel="noreferrer noopener"
Expand Down

0 comments on commit 7afbece

Please sign in to comment.