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

@g123jp/g123-ui

Package Overview
Dependencies
Maintainers
0
Versions
151
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@g123jp/g123-ui

Reuseable UI based on G123 Design System

  • 2.5.16
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
13
decreased by-89.26%
Maintainers
0
Weekly downloads
 
Created
Source

g123-ui

Reuseable UI based on G123 Design System and Atomic Design

image

📦 Install

yarn add @g123jp/g123-ui

🔨 Usage

  • make sure tailwindcss has been installed correctly.

  • make sure Tailwind's default style has been loaded correctly.

    expand details

    # in your root css
    @tailwind base;
    @tailwind components;
    @tailwind utilities;
    

  • make sure postcss has been configured correctly(if you use TailwindCSS as a PostCSS plugin).

  • import g123-ui's config as default(use tailwindcss's presents)

    import { g123TailwindPresets } from '@g123jp/g123-ui';
    
    const TailwindConfig = {
      // use g123-ui's presets as default
      presets: [g123TailwindPresets],
      content: [
        // ... put your content here
        './node_modules/@g123jp/g123-ui/dist/components/**/*.js',
        './node_modules/@g123jp/g123-ui/dist/utils/**/*.js',
      ],
      // ... your other configs
    };
    
  • use g123-ui's component:

    import { Button, ButtonType, Logo } from '@g123jp/g123-ui';
    
    const App = () => (
      <>
        <Logo />
        <Button type={ButtonType.primay}>Submit</Button>
      </>
    );
    

🌛 Dark Mode:

  • g123-ui supports the system's dark mode by default(uses the prefers-color-scheme CSS media feature).
  • But you can also build sites that support toggling dark mode manually using the ‘class’ strategy.
  • Or use your own customize the dark mode selector, for example, add the following code in your tailwind.config.js and control dark mode by adding data-mode="g123-dark" to your <html> tag:
darkMode: ['class', '[data-mode="g123-dark"]'];

image

⌨️ Development

  • install

    yarn
    
  • build

    ⛑: Make sure to run build before publishing it.

    yarn build
    
  • 🤹🏼 check with storybook

    yarn storybook
    
    image
  • bundle visualize and analyze with rollup-plugin-visualizer

    yarn build
    

    then open stats/network/index.html or stats/treemap/index.html in your browser.

FAQs

Package last updated on 10 Dec 2024

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