1.0.3 • Published 4 years ago

@college-hunks/components v1.0.3

Weekly downloads
-
License
MIT
Repository
bitbucket
Last release
4 years ago

@college-hunks/components

This package contains theme and reusable components for all college hunks (CHHJ) apps.

NPM version License


Installation

In order to install package use:

npm install --save @college-hunks/components

or

yarn add @college-hunks/components

Examples

Usage of chhj components

import React from "react";
import { Button } from "@college-hunks/components";

const SampleComponent = () => (
  <div>
    <Button buttonType="two-tone">Sample button</Button>
  </div>
);

Usage of chhj theme

import React from "react";
import { CollegeHunksTheme } from "@college-hunks/components";

const AppProviders = () => <CollegeHunksTheme>{children}</CollegeHunksTheme>;

or

import React, { ReactNode } from "react";
import { createMuiTheme, ThemeProvider } from "@material-ui/core/styles";
import CssBaseline from "@material-ui/core/CssBaseline";
import { palette, typography, overrides } from "@college-hunks/components";

const theme = createMuiTheme({
  palette,
  typography,
  overrides,
});

const Theme = ({ children }: { children: ReactNode }) => (
  <ThemeProvider theme={theme}>
    <CssBaseline />
    {children}
  </ThemeProvider>
);

const AppProviders = () => <Theme>{children}</Theme>;

Local development

In root folder:

  • yarn (install dependencies)
  • yarn start (build and watch components library)

Next, in example folder:

  • cd example (go to example folder)
  • yarn (install dependencies)
  • yarn start (start local development server)

Your default browser should automatically open at: http://localhost:3000

Who do I talk to

  • Paula Jędruszczak (paula.jedruszczak@tsh.io)

Learn More

Made with create-react-library. Create React Library

You can learn more in the Create React App documentation.

To learn React, check out the React documentation.

License

License

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago