New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@tabnews/ui

Package Overview
Dependencies
Maintainers
0
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tabnews/ui

TabNews UI

  • 0.3.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

@tabnews/ui

A React component library for tabnews.com.br.

Installation

To install the package, use:

npm i @tabnews/ui

Configure Next.js

In your next.config.js, add @tabnews/ui to transpilePackages:

// next.config.js
transpilePackages: ['@tabnews/ui'],

In pages/_document.js, you must export it as default:

// pages/_document.js
export { Document as default } from '@tabnews/ui/document';

Theme Setup

Fixed Theme

To use a fixed color mode (e.g., night mode), wrap your app with ThemeProvider in _app.js:

// pages/_app.js
import { ThemeProvider } from '@tabnews/ui';

export default function NextApp({ Component, pageProps }) {
  return (
    <ThemeProvider colorMode="night">
      <Component {...pageProps} />
    </ThemeProvider>
  );
}

Automatic Theme

For automatic theme switching based on user preference, use AutoThemeProvider:

// pages/_app.js
import { AutoThemeProvider } from '@tabnews/ui';

export default function NextApp({ Component, pageProps }) {
  return (
    <AutoThemeProvider defaultColorMode="night">
      <Component {...pageProps} />
    </AutoThemeProvider>
  );
}

Configure Vitest

In vitest.config.js, set test.server.deps.inline to true:

// vitest.config.js
test.server.deps.inline: true

Examples

See examples in the examples directory.

Keywords

FAQs

Package last updated on 10 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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