Skip to content

Commit 9d4a66e

Browse files
committed
expose fetchStylesheet
1 parent 00e7d51 commit 9d4a66e

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-pdf-html",
3-
"version": "2.0.1",
3+
"version": "2.0.2",
44
"author": "Dan Blaisdell dan@manifestwebdesign.com",
55
"description": "Html component for react-pdf with CSS support",
66
"keywords": [

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
export { default, default as Html } from './Html.js';
22
export { default as renderHtml } from './render.js';
33
export { HtmlStyle, HtmlStyles } from './styles.js';
4-
export { fetchStylesheets } from './remoteCss.js';
4+
export { fetchStylesheets, fetchStylesheet } from './remoteCss.js';

src/remoteCss.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { createCache } from './cache.js';
55

66
export const CSS_CACHE = createCache({ limit: 30 });
77

8-
export const resolveCssFile = async (
8+
export const fetchStylesheet = async (
99
src: string,
1010
fetchOptions?: RequestInit,
1111
cache = true
@@ -41,7 +41,7 @@ export const fetchStylesheets = async (
4141
.querySelectorAll('link[rel="stylesheet"][href]')
4242
.map(async (styleNode) => {
4343
try {
44-
const styleText = await resolveCssFile(
44+
const styleText = await fetchStylesheet(
4545
styleNode.getAttribute('href') as string,
4646
fetchOptions
4747
);

0 commit comments

Comments
 (0)