Closed angeloashmore closed 2 years ago
Merging #135 (16484ca) into master (3aeeda5) will not change coverage. The diff coverage is
100.00%
.
@@ Coverage Diff @@
## master #135 +/- ##
=======================================
Coverage 92.67% 92.67%
=======================================
Files 16 16
Lines 273 273
Branches 61 62 +1
=======================================
Hits 253 253
Misses 5 5
Partials 15 15
Impacted Files | Coverage Δ | |
---|---|---|
src/PrismicRichText.tsx | 96.29% <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 3aeeda5...16484ca. Read the comment docs.
Path | Size |
---|---|
dist/index.js | 4.42 KB (0%) |
dist/index.cjs | 6.3 KB (-0.02% 🔽) |
Types of changes
Description
This PR adds a
fallback
prop to<PrismicRichText>
. The value given tofallback
is rendered when<PrismicRichText>
is given an empty field. If afallback
prop is not given,null
is rendered (this is the existing functionality).In this example,
<p>Empty content</p>
is rendered ifdocument.data.richTextField
is empty (i.e. nullish or contains no content).Checklist:
🦎