1.0.19 • Published 11 months ago

@tagaddod/t-core-ui-kit v1.0.19

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

tagaddod logo WEB-CORE-UI-KIT

This is the core UiKit that should be used across all web apps in TAGADDOD


Preview

visit StoryBook


How To Use

  1. In app root styles (index.css) import:

    • @import "@tagaddod/t-core-ui-kit/styles";

    • @import "@tagaddod/t-core-ui-kit/tailwindStyles";

  2. Import tailwindCSS Configs as follows:

    • export * as default from "@tagaddod/t-core-ui-kit/tailwindConfig";
  3. Import components as following:

    • import { Button } from "@tagaddod/t-core-ui-kit";

FOR TAGADDODIANS ; )

In case you are a TAGADDOD developer first of all welcome on-board 🥳. The following part should help you in enhancing, maintaining and developing new features, so please read carefully.

Create new Component Guide

  1. under lib/components create a folder with the name of your component and create the following files:

    • [_ComponentName_].tsx EX: Button.tsx

    • [_ComponentName_].test.tsx EX: Button.test.tsx

    • [_ComponentName_].stories.ts EX: Button.stories.ts

  2. To add custom styles

    You should build a custom tailwind plugin so follow the steps below:

    1. create new file uder lib/styles and name it tailwind.[_ComponentName_].js EX: tailwind.Button.js

    2. Then add the file to plugins array EX: plugins: [require("./tailwind.Button.js"), ...etc],

    *For more information about tailwindcss plugins read this blog post

  3. sds


$${React + TypeScript + Vite}$$

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

  • Configure the top-level parserOptions property like this:
export default {
  // other rules...
  parserOptions: {
    ecmaVersion: "latest",
    sourceType: "module",
    project: ["./tsconfig.json", "./tsconfig.node.json"],
    tsconfigRootDir: __dirname,
  },
};
  • Replace plugin:@typescript-eslint/recommended to plugin:@typescript-eslint/recommended-type-checked or plugin:@typescript-eslint/strict-type-checked
  • Optionally add plugin:@typescript-eslint/stylistic-type-checked
  • Install eslint-plugin-react and add plugin:react/recommended & plugin:react/jsx-runtime to the extends list