1.0.24 • Published 1 year ago

react-sf-themes v1.0.24

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

react-sf-themes

This packages contains the global Superflows configuration including the default UI theme.

NPM JavaScript Style Guide Node.js CI

Documentation

Read 📖

On This Page

Introduction

Use the react-sf-themes package to access the global configuration and the default theme provided by Superflows. If needed you can customize it as you want by changing the default values to suit your UI.

How It Works

Customization works as follows:

  • Access the default configuration and theme values using this package
  • Modify them as per your requirement
  • Pass the modified object to your Superflows components

Theme

This package provides default values for:

  • Variants
  • Types
  • Colors
  • Spaces
  • Dimensions
  • Modes
  • InputTypes
  • Breakpoints

Variants

Superflows provides the following variants:

  • Primary
  • Secondary
  • Danger
  • Success
  • Warning
  • Info
  • Light
  • Dark

Types

Types are as followed:

  • Filled
  • Outlined

Colors

Following colors are provided:

VariantBackground ColorText Color
Primary#0d6efd#ffffff
Secondary#6c757d#ffffff
Danger#dc3545#ffffff
Success#198754#ffffff
Warning#ffc107#000000
Info#0dcaf0#000000
Light#f8f9fa#000000
Dark#212529#ffffff

Spaces

Spaces are dimensions, which are intended to be used for spacings, paddings, margins, etc.

SpaceValue
min5
ltl10
mod15
big20
lrg25
xlg30
max35

Dimensions

Dimensions are default dimensions for certain Superflows components

DimensionValue
navHeight60
navBannerHeight30
menuWidth120
notificationListWidth200
notificationListMaxWidth200

Modes

Modes are:

ModeValue
Dayday
Nightnight

InputTypes

Input types are types of input accepted from the users in the input field.

InputTypeValue
Namename
Emailemail
Mobilemobile
Datedate
DateOfBirthdateOfBirth
Gendergender

Breakpoints

Breakpoints are widths, that are used in responsive design.

BreakpointValue
mobile480
tablet768
laptop1024
desktop1200

Quickstart

Installation

npm install --save react-sf-themes

Usage

import React from 'react'
import Themes from 'react-sf-themes'

const App = () => {

  console.log('Themes', Themes.getTheme());

  return <div></div>
}

export default App

Tests

How To Run

To run tests locally:

npm test

Results

PASS src/index.test.tsx

  • Themes
    • ✓ Render (3ms)

-----------|----------|----------|----------|----------|-------------------| File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s | -----------|----------|----------|----------|----------|-------------------| All files | 100 | 100 | 100 | 100 | | index.tsx | 100 | 100 | 100 | 100 | | -----------|----------|----------|----------|----------|-------------------| Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: 2.445s

License

MIT © superflows-dev

1.0.19

1 year ago

1.0.22

1 year ago

1.0.21

1 year ago

1.0.20

1 year ago

1.0.24

1 year ago

1.0.23

1 year ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago