diff --git a/README.md b/README.md index 0d6babe..86dba98 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,127 @@ # React + TypeScript + Vite -This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. +## What's this? -Currently, two official plugins are available: +This is a react + vite starter template but uses tenoxui css framework for styling. -- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh -- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh +## How's it looks like -## Expanding the ESLint configuration +This is how the new style looks like : -If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: +```js +import tenoxui, { use, makeStyles } from "tenoxui"; +import property from "@tenoxui/property"; + +const styles = () => { + use(property); + + makeStyles({ + body: "m-0 d-flex place-items-center w-mn-320px h-mn-100vh", + "#root": "w-mx-1280px mh-auto" + // more styles + }); + + tenoxui(); +}; +``` + +Here's the breakdown : + +1. Import all necessary module + +```js +import tenoxui, { use, makeStyles } from "tenoxui"; +import property from "@tenoxui/property"; +``` + +2. What is `property`? + +```js +import property from "@tenoxui/property"; + +const styles = () => { + use(property); + + // other code +}; +``` + +`property` can optionally imported if you don't wanna re-define your types and properties manually. The `property` is basically bunch of types and properties that already defined before and you can just include it to your project. + +3. `use` function + +`use` is a function can store your types and properties. It will make sure the functions like `makeStyles()` and `tenoxui()` knows which class names they need to process or can processed. + +```js +use({ c: "color", fs: "fontSize" }); +``` -- Configure the top-level `parserOptions` property like this: +After added some types and properties inside of it, you can immediately use the types as prefix class to your element : + +```html +