0.7.21 • Published 3 months ago

simplygrow-ui v0.7.21

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

SimplyGrow UI

A library of React components, hooks and utility functions built with TypeScript and CSS Modules.

Usage

Install package

npm install simplygrow-ui

Global CSS

In your root component/layout, paste the following code:

import 'simplygrow-ui/dist/esm/index.css';

UIProvider component

In your root component/layout, import the <UIProvider /> component and wrap your React children (as well as any other React context providers involving UI). This allows you to select the SimplyGrow app you are using, which will update the colours of all components.

Next.js

import { UIProvider } from 'simplygrow-ui';

interface RootLayoutProps {
  children: ReactNode
}

const RootLayout: FC<RootLayoutProps> = ({ children }) => {
  return (
    <html lang="en">
      <body>
        <UIProvider appTheme={'skillbook'}>
          <main>{children}</main>
        </UIProvider>
      </body>
    </html>
  )
}

export default RootLayout

Create React App

import { UIProvider } from 'simplygrow-ui';

function App({ children }) {
  return (
    <UIProvider appTheme={'peopleflow'}>
      {children}
    </UIProvider>
  );
}

export default App

Components

  • ActionButton
  • LinkButton
  • FileInputButton
  • CheckboxInput
  • FlexContainer
  • FormContainer
  • GridContainer
  • Header
  • Heading
  • Input
  • LinkText
  • LoadingSpinner
  • Modal
  • OTPInput
  • Paragraph
  • Select
  • UnorderedList
  • Code

Developing

To contribute to simplygrow-ui, following these steps:

Ensure you have Node v20.14.0 installed. If you use nvm, run the following command to use the version of Node stipulated in nvmrc.

nvm use

Install the project dependencies.

npm install

In order to test out the components in a realistic React context while developing, use the simple React app bundled with Rollup. Import any components into src/app.js to test them out. To run the React app, run the following terminal commands in two terminal instances at the same time:

npm run build:watch

This will bundle your code with Rollup and re-run the bundle on file changes.

npm run dev

This will spin up a simple server accessed at localhost:3000 to host the file in public/index.html.

0.7.21

3 months ago

0.7.20

3 months ago

0.7.11

5 months ago

0.7.10

5 months ago

0.7.9

5 months ago

0.7.13

5 months ago

0.7.12

5 months ago

0.7.6

6 months ago

0.7.8

5 months ago

0.7.7

6 months ago

0.7.19

3 months ago

0.7.18

3 months ago

0.7.15

5 months ago

0.7.17

4 months ago

0.7.16

4 months ago

0.7.4

9 months ago

0.7.5

9 months ago

0.7.3

10 months ago

0.7.2

10 months ago

0.7.1

10 months ago

0.7.0

10 months ago

0.6.13

10 months ago

0.6.12

10 months ago

0.6.11

10 months ago

0.6.10

10 months ago

0.6.9

10 months ago

0.6.8

10 months ago

0.6.7

10 months ago

0.6.6

10 months ago

0.6.5

10 months ago

0.6.4

10 months ago

0.6.3

10 months ago

0.5.3

10 months ago

0.5.1

10 months ago

0.5.0

10 months ago

0.4.18

10 months ago

0.4.17

10 months ago

0.4.16

10 months ago

0.4.14

10 months ago

0.4.13

10 months ago

0.4.11

10 months ago

0.4.10

10 months ago

0.4.9

10 months ago

0.4.8

10 months ago

0.4.7

10 months ago

0.4.6

10 months ago

0.4.5

10 months ago

0.4.4

10 months ago

0.4.3

11 months ago

0.4.2

11 months ago

0.4.1

11 months ago

0.4.0

11 months ago

0.3.2

11 months ago

0.3.1

11 months ago

0.3.0

11 months ago

0.2.7

11 months ago

0.2.6

11 months ago

0.2.4

11 months ago

0.2.3

11 months ago

0.2.2

11 months ago

0.2.1

11 months ago

0.2.0

11 months ago

0.1.0

11 months ago