Comparing version 0.5.1 to 0.5.2
@@ -24,2 +24,3 @@ import React from 'react'; | ||
className?: string; | ||
codeClassName?: string; | ||
lineNumbers?: boolean; | ||
@@ -31,2 +32,5 @@ unstyled?: boolean; | ||
theme?: BrightTheme; | ||
replace?: { | ||
[x: string]: string; | ||
}; | ||
}; | ||
@@ -33,0 +37,0 @@ declare const Code: CodeComponent; |
@@ -70,2 +70,3 @@ "use strict"; | ||
className, | ||
codeClassName, | ||
lineNumbers, | ||
@@ -131,3 +132,3 @@ unstyled, | ||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("style", { dangerouslySetInnerHTML: { __html: css } }), | ||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", { children: kids }) | ||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", { className: codeClassName, children: kids }) | ||
] | ||
@@ -172,2 +173,3 @@ } | ||
className, | ||
codeClassName, | ||
lineNumbers, | ||
@@ -190,2 +192,3 @@ unstyled, | ||
className, | ||
codeClassName, | ||
lineNumbers, | ||
@@ -204,2 +207,3 @@ unstyled, | ||
className, | ||
codeClassName, | ||
lineNumbers, | ||
@@ -220,2 +224,3 @@ unstyled, | ||
className, | ||
codeClassName, | ||
lineNumbers, | ||
@@ -222,0 +227,0 @@ unstyled, |
{ | ||
"name": "bright", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"main": "./dist/index.js", | ||
@@ -5,0 +5,0 @@ "module": "./dist/index.mjs", |
@@ -5,4 +5,20 @@ **work in progress** | ||
## Usage | ||
```bash | ||
npm install bright | ||
``` | ||
Use it from a **server component**, for example in Next.js `app/page.js`: | ||
```js | ||
import { Code } from "bright" | ||
export default function Page() { | ||
return <Code lang="py">print("hello brightness")</Code> | ||
} | ||
``` | ||
## Credits | ||
- Thanks [LEI Zongmin](https://github.com/leizongmin) for providing the bright npm package name |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13836
463
24