npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

nhc-dga-ui

v0.0.19

Published

DGA ui library

Downloads

1,005

Readme

Logo

Definition

A React components library designed to streamline UI development by providing a set of reusable, accessible, and highly customizable components based on the DGA design system. Built with TypeScript by "NHC development team" for type safety and scalability, this library enables you to create modern, consistent, responsive user-friendly interfaces with minimal effort.

Demo

Features

  • A set of high-quality React components based on DGA design system.
  • Implements components that adhere to the DGA design principles, ensuring consistency and usability.
  • TypeScript support: full TypeScript integration for enhanced type safety and improved developer experience.
  • Customizability: easily themeable and customizable to fit your specific project requirements.
  • Responsive design: components are designed to work seamlessly across all screen sizes and devices.

Install

npm install nhc-dga-ui
yarn add nhc-dga-ui

Usage Example

import { Button, StatusTag } from 'nhc-dga-ui';

export default () => (
  <>
    <Button>Click me</Button>
    <StatusTag color="secondary">Secondary status</StatusTag>
  </>
);

RTL

Theme override

By overriding the theme using ThemeProvider and setting its direction to rtl.

import {ThemeProvider, StatusTag} from "nhc-dga-ui";

export default () => (
    <ThemeProvider theme={{ direction: "rtl" }}>
        <StatusTag>status</StatusTag>
    </ThemeProvider>
  );

withRtl HOC

You can wrap any component by withRtl HOC to act as rtl;

import { withRtl } from 'nhc-dga-ui';

const MyComponent = () => (
    <StatusTag>status</StatusTag>
);

export default withRtl(MyComponent)

Theme

Theme Override

All theme values are overridable by passing a theme object containing the override values.

e.g override the golden secondary color to the lavender color:

import { ThemeProvider, Button } from 'nhc-dga-ui';

export default () => (
    <ThemeProvider
    theme={{
      palette: {
        secondary: {
          25: "#FEFCFF",
          50: "#F9F5FA",
          100: "#F2E9F5",
          200: "#E1CCE8",
          300: "#CCADD9",
          400: "#A57BBA",
          500: "#80519F",
          600: "#6D428F",
          700: "#532D75",
          800: "#3D1D5E",
          900: "#281047",
          950: "#16072E",
          light: "#CCADD9",
          main: "#80519F",
          dark: "#532D75",
          contrastText: "#FFF",
        },
      },
    }}
  >
    <Button color="secondary">Button</Button>
  </ThemeProvider>
);

useTheme hook

To retrieve the theme object:

import { useTheme } from "nhc-dga-ui";

export default () => {
    const theme = useTheme();

    return (
        <p style={{color: theme.palette.primary[600]}}>Paragraph text colored from my custom theme</p>
    );
};

Support

If you have any questions, issues, or feedback, feel free to reach out. I'm happy to assist with any concerns or inquiries.

You can contact me via email at [email protected].