@tagaddod/t-core-ui-kit
v1.0.19
Published
This is the core UiKit that should be used across all web apps in TAGADDOD
Downloads
4
Maintainers
Readme
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
In app root styles (index.css) import:
@import "@tagaddod/t-core-ui-kit/styles";
@import "@tagaddod/t-core-ui-kit/tailwindStyles";
Import tailwindCSS Configs as follows:
export * as default from "@tagaddod/t-core-ui-kit/tailwindConfig";
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
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
To add custom styles
You should build a custom tailwind plugin so follow the steps below:
create new file uder
lib/styles
and name ittailwind.[_ComponentName_].js
EX: tailwind.Button.jsThen add the file to plugins array EX:
plugins: [require("./tailwind.Button.js"), ...etc],
*For more information about tailwindcss plugins read this blog post
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:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
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
toplugin:@typescript-eslint/recommended-type-checked
orplugin:@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 theextends
list