Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@stianlarsen/react-code-preview

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stianlarsen/react-code-preview - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

package.json
{
"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)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc