@stianlarsen/react-code-preview
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "@stianlarsen/react-code-preview", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "A React component that provides tabbed navigation for viewing a live component preview and its source code separately.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -5,4 +5,4 @@ # @stianlarsen/react-code-preview | ||
![Code Interface](./assets/code.png) | ||
![Preview Interface](./assets/preview.png) | ||
![Code Interface](./dist/assets/code.png) | ||
![Preview Interface](./dist/assets/preview.png) | ||
_The intuitive tabbed interface of @stianlarsen/react-code-preview_ | ||
@@ -55,4 +55,2 @@ | ||
```` | ||
Import the `CodePreview` component and provide the necessary props: | ||
@@ -66,5 +64,5 @@ | ||
function App() { | ||
const buttonDemo = <ButtonDemo /> | ||
return ( | ||
<CodePreview | ||
const buttonDemo = <ButtonDemo />; | ||
return ( | ||
<CodePreview | ||
component={buttonDemo} | ||
@@ -75,5 +73,5 @@ code={ButtonDemoCode} | ||
/> | ||
); | ||
); | ||
} | ||
```` | ||
``` | ||
@@ -107,21 +105,18 @@ ### Themes | ||
:root { | ||
--radius: 0.5rem; /_ Adjusts the border radius _/ | ||
--radius: 0.5rem; | ||
/_ Light Theme Variables _/ | ||
--background: 0 0% 100%; /_ Background color _/ | ||
--foreground: 240 10% 3.9%; /_ Foreground color _/ | ||
--muted: 240 6% 10%; /_ Muted color for less emphasis _/ | ||
--muted-foreground: 240 3.8% 46.1%; /_ Muted foreground color _/ | ||
--border: 240 5.9% 90%; /_ Border color _/ | ||
--ring: 240 5% 64.9%; /_ Ring color for focused elements _/ | ||
--background: 0 0% 100%; | ||
--foreground: 240 10% 3.9%; | ||
--muted: 240 6% 10%; | ||
--muted-foreground: 240 3.8% 46.1%; | ||
--border: 240 5.9% 90%; | ||
--ring: 240 5% 64.9%; | ||
/_ Dark Theme Variables _/ | ||
--background: 240 10% 3.9%; /_ Background color for dark mode _/ | ||
--foreground: 0 0% 98%; /_ Foreground color for dark mode _/ | ||
--border: 240 3.7% 15.9%; /_ Border color for dark mode _/ | ||
--background: 240 10% 3.9%; | ||
--foreground: 0 0% 98%; | ||
--border: 240 3.7% 15.9%; | ||
} | ||
/_ Example usage: Dimming a color by half _/ | ||
.test-class { | ||
background-color: hsl(var(--muted) / 0.5); /_ Dimmed by 50% _/ | ||
background-color: hsl(var(--muted) / 0.5); | ||
} | ||
@@ -145,1 +140,2 @@ ``` | ||
- Email: [stian.larsen@mac.com](mailto:stian.larsen@mac.com) | ||
- NPM: [@Stianlarsen](https://www.npmjs.com/~stianlarsen) |
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
618329
136