From f0190d23772fea6d9b06777675c00231511640e9 Mon Sep 17 00:00:00 2001 From: Ivanka Todorova Date: Sun, 9 Jan 2022 19:13:39 +0200 Subject: [PATCH] feat: update documentation (resolve #5) --- README.md | 144 +++++++++++++++++++++++++++++++++++++++++++++++- docs/index.html | 30 +++++----- docs/style.css | 44 +++++++-------- src/main.js | 22 ++++---- 4 files changed, 187 insertions(+), 53 deletions(-) diff --git a/README.md b/README.md index c5f6708..bbfae43 100644 --- a/README.md +++ b/README.md @@ -13,10 +13,10 @@ TailwindCSS powered UI kit following simply superb.'s design system. +[➡️ Demo available here](https://simplysuperb-dev.github.io/) -## Available Styles - -You can find all currently available styles at https://simplysuperb-dev.github.io/ui-kit/ +## Why +I am building few applications (iOS / Android / Mobile), which share common visual elements, so I am using this kit for another package containing React components and wanted to wrap common tailwindcss utilities as components. ## Installation @@ -37,6 +37,144 @@ module.exports = { } ``` +## Usage + +### Colors + +All defined colors are used for generating classes for styling: `.list`, `.link` and `.btn` aswell. Refer to the [source code](https://github.com/simplysuperb-dev/ui-kit/tree/main/src/components) of each of those components for their further usage. + +List of colors: + +- **transparent**: transparent +- **white**: #FFFFFF +- **graphite**: #2e2e2e +- **grey**: #aaaaaa +- **green**: #98b88b +- **green-secondary**: #8ba780 +- **porcelain**: #f1f3f4 +- **blue**: #8b8fb8 +- **blue-secondary**: #5d64a5 +- **orange**: #dba475 +- **orange-secondary**: #d09562 +- **yellow**: #FFC634 +- **red**: #cd5f5f +- **red-secondary**: #bf2a2a + +### Typography + +**Fonts** +- `.font-serif`: Merriweather +- `.font-sans`: Merriweather Sans + +**Font Sizes** +- `.text-h1` / `.text-h2` / `.text-h3` / `.text-h4` / `.text-h5` / `.text-h6`: heading styles that should be used in combination with `.font-serif` +- `.text-subtitle` / `.text-caption` / `.text-overline`: used for adding emphasis +- `.text-base`: resetting the font size +- `.text-button`: used on `.btn` components + +### Basic Components +**`.list`** +```html + + + +``` + +**`.link`** +```html +Green link +``` + +**`.btn`** + +```html + + + + + + + + + ``` + + ### Form components + +Form components must be wrapped inside a `.form-element` div and by adding `has-error` class to that div they will be styled properly to indicate any validation errors. + +Additionally you might use `.form-label` for styling `