1.2.6 • Published 1 year ago

majr-react v1.2.6

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

majr-react

Design system for MAJR DAO. Figma: https://www.figma.com/community/file/1181293730237117344

NPM JavaScript Style Guide

Install

npm install --save majr-react

Usage

Example:

import React, { Component } from 'react'

import { Button } from 'majr-react'
import 'majr-react/dist/index.css'

export default function Home(){
  return (
    <section>
      <Button onClick={() => {}} text='Main btn' variant='main' />
    </section>
  )
}

Button

Props:

text: string
onClick: () => void
variant?: 'light' (default) | 'dark' | 'main' | 'highlight' | 'highlightdark'
rounded?: boolean (default: false)
import React, { Component } from 'react'

import { Button } from 'majr-react'
import 'majr-react/dist/index.css'

<Button onClick={() => {}} text='Main btn' variant='main'/>

IconButton

Uses the same shadows as the Button component, but only has an icon.

Props:

icon: any
onClick: () => void
variant?: 'light' | 'dark'
rounded?: boolean
import React, { Component } from 'react'

import { IconButton } from 'majr-react'
import 'majr-react/dist/index.css'

<IconButton onClick={() => {}} text='Main btn' variant='main'/>

Navbar button

These are the buttons used in the navbar of the Chrome extension.

Uses the same shadows as the Button component, but has an icon and text. The active looks like an input

Props:

icon: any
text: string
onClick: () => void
variant?: 'light' | 'dark' | 'active' | 'activeDark'
rounded?: boolean
import React, { Component } from 'react'

import { NavbarBtn } from 'majr-react'
import 'majr-react/dist/index.css'

<NavbarBtn onClick={() => {}} text='Main btn' variant='main'/>

Input

Props:

text: string
setText: (text: string) => void
variant?: 'light' | 'dark'
placeholder?: string
import React, { Component } from 'react'

import { Input } from 'majr-react'
import 'majr-react/dist/index.css'

<Input text={text} setText={setText} variant='light' placeholder='Enter text'/>

License

MIT © TomasDmArg

1.2.0

1 year ago

1.1.0

1 year ago

1.0.16

1 year ago

1.2.6

1 year ago

1.2.5

1 year ago

1.2.4

1 year ago

1.2.3

1 year ago

1.2.2

1 year ago

1.2.1

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago