diff --git a/package-lock.json b/package-lock.json index 5232397..6c5d5e3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "react-hot-toast", - "version": "1.0.2", + "version": "2.0.0-beta.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -4322,9 +4322,9 @@ } }, "csstype": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.5.tgz", - "integrity": "sha512-uVDi8LpBUKQj6sdxNaTetL6FpeCqTjOvAQuQUa/qAqq8oOd4ivkbhgnqayl0dnPal8Tb/yB1tF+gOvCBiicaiQ==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.7.tgz", + "integrity": "sha512-KxnUB0ZMlnUWCsx2Z8MUsr6qV6ja1w9ArPErJaJaF8a5SOWoHLIszeCTKGRGRgtLgYrs1E8CHkNSP1VZTTPc9g==", "dev": true }, "cyclist": { @@ -6029,9 +6029,9 @@ "dev": true }, "goober": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/goober/-/goober-2.0.18.tgz", - "integrity": "sha512-XaYq9GqRkWHS0DFPQZQLhrKGWWbiz+ydiEbMRN8eGJZ7enDjmWnRv3RWn5RwdukjnHUA6b/AQcf4QWjellKOCw==" + "version": "2.0.35", + "resolved": "https://registry.npmjs.org/goober/-/goober-2.0.35.tgz", + "integrity": "sha512-800lO2kBZg2UEpGDST2Jsx8FDaEaSuEXBYV6HlmPBX4HPaDCM/qeMtHM20a7ZmGxDjHONx5+CUKPLYTrcf7Lwg==" }, "graceful-fs": { "version": "4.2.4", diff --git a/package.json b/package.json index dd37f2a..301c402 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,9 @@ { "name": "react-hot-toast", - "version": "1.0.2", + "version": "2.0.0-beta.0", "author": "Timo Lins", "license": "MIT", + "sideEffects": false, "repository": "timolins/react-hot-toast", "keywords": [ "react", @@ -60,10 +61,11 @@ "@size-limit/preset-small-lib": "^4.9.1", "@types/react": "^17.0.0", "@types/react-dom": "^17.0.0", + "csstype": "^3.0.7", "size-limit": "^4.9.1", "tsdx": "^0.14.1" }, "dependencies": { - "goober": "^2.0.15" + "goober": "^2.0.35" } } diff --git a/site/components/code.tsx b/site/components/code.tsx index 12c281b..e86a4ca 100644 --- a/site/components/code.tsx +++ b/site/components/code.tsx @@ -103,9 +103,10 @@ const theme: PrismTheme = { export const Code: React.FC<{ snippet: string; + language?: Language; className?: string; }> = (props) => { - const language = (props.className?.replace(/language-/, '') as any) || 'jsx'; + const language = props.language || 'jsx'; return ( = ({ children, href }) => ( - + {children} @@ -53,8 +53,8 @@ export default function DocsLayout({ children, meta }) { GitHub -