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

@healthcatalyst/react-cashmere

v1.0.2

Published

React version of @HealthCatalyst/Fiber.Cashmere

Downloads

374

Readme

npm version Master Build Status Develop Build Status Commitizen friendly

Getting Started with React Cashmere

Install

First you will need an existing react app or create a new project using create react app.

npx create-react-app my-app

Install the peer dependencies (You will need React 17.x.x|18.x.x and Material UI 5.8.x)

npm install --save @mui/lab @mui/material

Now you can install React Cashmere and fonts

npm install --save @healthcatalyst/react-cashmere

# optional install fonts and icons sets
npm install --save sass font-awesome notosans-fontface @healthcatalyst/cashmere

Adding Fonts

Create a sass file to import the desired fonts. These fonts are optional if your app does not need them.

/* src/fonts.scss */
$fa-font-path: "~font-awesome/fonts";
@import "~font-awesome/scss/font-awesome";

$notosans-fontface-path: "~notosans-fontface/fonts";
@import "~notosans-fontface/scss/notosans-fontface-allweight";

$hc-icons-font-path: "~@healthcatalyst/cashmere/hcicons";
@import "~@healthcatalyst/cashmere/hcicons/hcicons";

ThemeProvider

Now you are ready to wrap your app with the ThemeProvider higher order component. The ThemeProvider will take care of all the cashmere styling and apply it so most Material UI child components are properly themed. There are also custom HC components such as Icon, Navbar, etc available.

/* src/index.js */
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
import { ThemeProvider, themes } from "@healthcatalyst/react-cashmere";
import "./fonts.scss"; /* optional scss fonts import */
const [lightTheme, darkTheme] = themes;

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
  <React.StrictMode>
    <ThemeProvider theme={lightTheme}>
      <App />
    </ThemeProvider>
  </React.StrictMode>
);
/* src/App.js */
import React from "react";
import Typography from "@mui/material/Typography";
import Box from "@mui/material/Box";
import Button from "@mui/material/Button";

import { Icon, Navbar } from "@healthcatalyst/react-cashmere";

const App = (props) => {
  return (
    <Box mt={"53px"} p={2}>
      <Navbar
        position="fixed"
        appIcon="My App"
        brandIcon={<Icon size="large" icon={"hci-catalyst-logo"} />}
        linkContent={[]}
        rightContent={<Box p={2}>Welcome, User!</Box>}
      />
      <Typography variant="h1" pb={2}>
        Hello Cashmere!
      </Typography>
      <Typography variant="subheading1">
        This app is using React, Material UI and themed with Cashmere.
      </Typography>
      <Typography variant="h2" pt={3}>
        Butons
      </Typography>
      <Button color="primary">Button</Button>
      &nbsp;
      <Button color="secondary">Button</Button>
      <Typography variant="h2" pt={3}>
        Icons
      </Typography>
      Font Awesome: <Icon size="large" icon={"fa-cog"} />
      <br />
      Health Catalyst Icons: <Icon size="large" icon={"hci-catalyst-logo"} />
      <br />
    </Box>
  );
};

export default App;

Library Development & Contributing

More information about contributing to the repo can be found here: