1.2.61 • Published 2 years ago

bycoders-ui-react v1.2.61

Weekly downloads
-
License
UNLICENSED
Repository
github
Last release
2 years ago

This is bycoders_ oficial React Ui-Kit library.

Usage

yarn add bycoders-ui-react

You'll need to wrap your application with a context to use this library:

  • React:

    // src/index.js
    
    import { ThemeProvider, defaultTheme, ResetCSS } from 'bycoders-ui-react'
    
    function MyApp() {
      return(
        <ThemeProvider theme={defaultTheme}>
          <ResetCSS />
          <Router />
          <OtherComponents />
        </ThemeProvider>
      )
    }
    
    export default MyApp
  • Next:

    // src/pages/_app.js
    
    import { ThemeProvider, defaultTheme } from 'bycoders-ui-react'
    
    function MyApp({ Component, pageProps }) {
      return(
        <ThemeProvider theme={defaultTheme}>
          <ResetCSS />
          <Component {...pageProps} />
        </ThemeProvider>
      )
    }
    
    export default MyApp

you should import Google's Inter font, which is the default font, in your <head/> tag:

<head>
  ...
  <link rel="preconnect" href="https://fonts.gstatic.com" />
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap" rel="stylesheet" />
  ...
</head>

then you can use components like this:

// src/pages/foo.tsx

import React from 'react';
import { Input } from 'bycoders-ui-react';

export default function Foo() {
  return (
    <Input label="Your Label" error="Foo"/>
  );
}

Customize Theme

You can customize theme colors and add properties:

  • Adding new colors/properties:

    import { defaultTheme } from 'bycoders-ui-react';
    
    const newTheme = {
      ...defaultTheme,
      foo: '#fff',
      baz: '#ABCDEF',
    };
  • Customizing existing props:

    You can use BycodersTheme interface to view all properties of the theme.

    import { defaultTheme } from 'bycoders-ui-react';
    
    const newTheme = {
      ...defaultTheme,
      textColor: '#F3F3F3',
    };
  • Typescript

    If you're using Typescript maybe you should connect theme with styled-components:

    • If you're using legacy theme:

      // src/@types/styled-components.d.ts
      
      import { BycodersTheme } from 'bycoders-ui-react';
      
      declare module 'styled-components' {
        export interface DefaultTheme extends BycodersTheme {}
      }
    • If you're using a custom theme:

      // src/styles/newTheme.ts
      
      import { defaultTheme } from 'bycoders-ui-react';
      
      const newTheme = {
        ...defaultTheme,
        textColor: '#F3F3F3',
      };
      // src/@types/styled-components.d.ts
      
      import { newTheme } from '../styles/newTheme';
      
      type MyThemeType = typeof newTheme
      
      declare module 'styled-components' {
        export interface DefaultTheme extends MyThemeType {}
      }

Documentation

This project is documented on Storybook. You'll need to clone the project and execute storybook:

git clone git@github.com:ByCodersTec/ui-kit-react.git
yarn install
yarn storybook

Contribute

yarn install

To contribute, merge your desired PR to development and then:

git checkout development
git pull origin development
yarn bump-patch
git push origin development --follow-tags
git checkout master
git pull origin master
git merge development
git push origin master
1.2.61

2 years ago

1.2.60

2 years ago

1.2.41

2 years ago

1.2.42

2 years ago

1.2.40

2 years ago

1.2.45

2 years ago

1.2.46

2 years ago

1.2.43

2 years ago

1.2.44

2 years ago

1.2.49

2 years ago

1.2.47

2 years ago

1.2.48

2 years ago

1.2.52

2 years ago

1.2.53

2 years ago

1.2.56

2 years ago

1.2.57

2 years ago

1.2.54

2 years ago

1.2.55

2 years ago

1.2.58

2 years ago

1.2.59

2 years ago

1.2.38

2 years ago

1.2.39

2 years ago

1.2.36

2 years ago

1.2.37

2 years ago

1.2.20

3 years ago

1.2.23

3 years ago

1.2.24

3 years ago

1.2.21

3 years ago

1.2.22

3 years ago

1.2.27

2 years ago

1.2.28

2 years ago

1.2.25

2 years ago

1.2.26

2 years ago

1.2.29

2 years ago

1.2.30

2 years ago

1.2.31

2 years ago

1.2.34

2 years ago

1.2.35

2 years ago

1.2.32

2 years ago

1.2.33

2 years ago

1.2.17

3 years ago

1.2.18

3 years ago

1.2.19

3 years ago

1.2.16

3 years ago

1.2.15

3 years ago

1.2.14

3 years ago

1.2.13

3 years ago

1.2.12

3 years ago

1.2.10

3 years ago

1.2.11

3 years ago

1.2.8

3 years ago

1.2.7

3 years ago

1.2.9

3 years ago

1.2.6

3 years ago

1.2.5

3 years ago

1.2.0

3 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.1.49

3 years ago

1.1.48

3 years ago

1.1.45

3 years ago

1.1.43

3 years ago

1.1.42

3 years ago

1.1.47

3 years ago

1.1.46

3 years ago

1.1.38

3 years ago

1.1.39

3 years ago

1.1.41

3 years ago

1.1.40

3 years ago

1.1.34

3 years ago

1.1.33

3 years ago

1.1.37

3 years ago

1.1.35

3 years ago

1.1.32

3 years ago

1.1.31

3 years ago

1.1.29

3 years ago

1.1.28

3 years ago

1.1.27

3 years ago

1.1.26

3 years ago

1.1.25

3 years ago

1.1.22

3 years ago

1.1.21

3 years ago

1.1.19

3 years ago

1.1.18

3 years ago

1.1.17

3 years ago

1.1.20

3 years ago

1.1.16

3 years ago

1.1.15

3 years ago

1.1.14

3 years ago

1.1.12

3 years ago

1.1.11

3 years ago

1.1.10

3 years ago

1.1.9

3 years ago

1.1.8

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.0.0

3 years ago