Closed angeloashmore closed 2 years ago
Merging #147 (4daf7fe) into master (966c792) will not change coverage. The diff coverage is
100.00%
.
@@ Coverage Diff @@
## master #147 +/- ##
=======================================
Coverage 92.06% 92.06%
=======================================
Files 18 18
Lines 315 315
Branches 74 74
=======================================
Hits 290 290
Misses 5 5
Partials 20 20
Impacted Files | Coverage Δ | |
---|---|---|
src/PrismicLink.tsx | 94.73% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 966c792...4daf7fe. Read the comment docs.
Path | Size |
---|---|
dist/index.js | 5.31 KB (+0.1% 🔺) |
dist/index.cjs | 6.83 KB (+0.09% 🔺) |
Types of changes
Description
This PR adds functionality to automatic set
target="_blank" rel="noopener noreferrer"
whenhref
is an external URL.This behavior applies to both the
href
andfield
props. In the following example, assumedoc.data.linkField
resolves to an external URL.target
andrel
can always be overriden by passing these props directly.This functionality was intended to ship with the initial
<PrismicLink>
releaes, but it was accidentally left out.Checklist:
🦮