Package Exports
- react-sf-themes
- react-sf-themes/dist/index.js
- react-sf-themes/dist/index.modern.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-sf-themes) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
react-sf-themes
Color theme for the Superflows component system
On This Page
Introduction
Use this package to access the default color theme provided by Superflows. Then customize it further by changing the default color values to suit your UI.
How It Works
Customization works as follows:
- Access the default color theme using this package
- Modify the colors as per your requirement
- Pass the modified theme to your Superflows components
Colors
Types of Colors
Superflows is designed using Bootstrap, naturally the color theme follows the Bootstrap's default color theme as well. Following color-types are defined:
Primary Color Secondary Color Danger Color Success Color Warning Color Info Color Light Color Dark Color
Color Values
Following color values are defined by default:
| Type | Background Color | Text 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 |
Quickstart
Installation
npm install --save react-sf-themesUsage
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 testsResults
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