-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: readme documentation added. 1.0.0 🚀
- Loading branch information
Showing
4 changed files
with
219 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,217 @@ | ||
# Yefee-Ui | ||
Yefee-Ui is on demo version right now and don't have a website/documentation yet. | ||
Yefee-ui is a **react mini-library**, right now yefee-ui have just **6** components, but it's **lightweight**, **type safe** & **easy to use**! | ||
|
||
Documentation Website'll be ready soon. | ||
You can customize whatever you want with **className** or **style** props. | ||
|
||
## Components | ||
### Button | ||
#### Example: | ||
``` | ||
import Button from "yefee-ui/src/lib/Button/Button"; | ||
. | ||
. | ||
. | ||
<Button type="outlined" color="secondary> | ||
Example! | ||
</Button> | ||
``` | ||
#### Props: | ||
##### Children* | ||
##### Type (?) | ||
* normal (default) | ||
* rounded | ||
* outlined | ||
* rounded-outlined | ||
##### Color (?) | ||
* primary (default) | ||
* success | ||
* danger | ||
* secondary | ||
* white | ||
|
||
### Alert | ||
#### Example: | ||
``` | ||
import Alert from "yefee-ui/src/lib/Alert/Alert"; | ||
. | ||
. | ||
. | ||
<Alert color="secondary> | ||
Example! | ||
</Alert> | ||
``` | ||
#### Props: | ||
##### Width (?) | ||
##### Height (?) | ||
##### Children* | ||
##### Color (?) | ||
* primary (default) | ||
* success | ||
* danger | ||
* secondary | ||
* white | ||
|
||
### Dialog | ||
#### Example: | ||
``` | ||
import Dialog from "yefee-ui/src/lib/Dialog/Dialog"; | ||
. | ||
. | ||
. | ||
const [show, setShow] = useState(false); | ||
return( | ||
<> | ||
<Button type="outlined" color="white" | ||
onClick={()=>setShow(true)}> | ||
Open the Dialog! | ||
</Button> | ||
<Dialog color="white"> | ||
Example! | ||
<Button type="outlined" color="danger" onClick={()=>setShow(false)}> | ||
Close it | ||
</Button> | ||
</Dialog> | ||
</> | ||
) | ||
``` | ||
#### Props: | ||
##### Show* | ||
##### Children (?) | ||
##### Color (?) | ||
* dark (default) | ||
* white | ||
|
||
### Dropdown | ||
#### Example: | ||
``` | ||
import DropdownBase from "yefee-ui/src/lib/Dropdown/Dropdown"; | ||
import Dropdown from "yefee-ui/src/lib/Dropdown/Dropdown"; | ||
import Button from "yefee-ui/src/lib/Button/Button"; | ||
. | ||
. | ||
. | ||
const [show, setShow] = useState(false); | ||
const items = [ | ||
{ | ||
name: "Hi!" | ||
change: "English" | ||
}, | ||
{ | ||
name: "Bonjour!" | ||
change: "French" | ||
}, | ||
{ | ||
name: "Selam!" | ||
change: "Turkish" | ||
}, | ||
{ | ||
name: "Hola!" | ||
change: "Spanish" | ||
}, | ||
] | ||
const [valueOfDropdown, setValueOfDropdown] = useState("Please pick an language"); | ||
return( | ||
<> | ||
<DropdownBase | ||
style={{ | ||
width: "320px", | ||
height: "160px", | ||
borderRadius: "32px", | ||
padding: "16px", | ||
fontSize:"16px" | ||
}} | ||
{/* style & classname are optional */} | ||
> | ||
<Button onClick={()=>setShow(!show)}> | ||
{valueOfDropdown} | ||
</Button> | ||
<Dropdown closer={()=>setShow(false)} setter={(change: any)=>setValueOfDropdown(change)} | ||
items={items} show={show} color="white" /> | ||
</DropdownBase> | ||
</> | ||
) | ||
``` | ||
#### Props: | ||
##### Show* | ||
##### Items: ``` [{ name: string, change: string ] ``` | ||
// the change in the object is change of the state when clicked to the dropdown item. | ||
##### Setter: state setter | ||
##### Close: Dropdown's closer function ex: ```() => setShow(false)``` | ||
##### Color (?) | ||
* dark (default) | ||
* white | ||
|
||
### Input | ||
> It have same props with input. | ||
#### Example: | ||
``` | ||
import Input from "yefee-ui/src/lib/Input/Input"; | ||
. | ||
. | ||
. | ||
<Input placeholder="hey, type something!" /> | ||
``` | ||
|
||
### Tooltip | ||
#### Example: | ||
``` | ||
import TooltipBase from "yefee-ui/src/lib/Tooltip/Tooltip"; | ||
import Tooltip from "yefee-ui/src/lib/Tooltip/Tooltip"; | ||
import Button from "yefee-ui/src/lib/Button/Button"; | ||
. | ||
. | ||
. | ||
const [show, setShow] = useState(false); | ||
const [valueOfDropdown, setValueOfDropdown] = useState("Please pick an language"); | ||
return( | ||
<> | ||
<TooltipBase | ||
style={{ | ||
width: "320px", | ||
height: "160px", | ||
borderRadius: "32px", | ||
padding: "16px", | ||
fontSize:"16px" | ||
}} | ||
{/* style & classname are optional */} | ||
> | ||
<Button onClick={()=>{setShow(true)} > | ||
Open Tooltip! | ||
</Button> | ||
<Tooltip position="left" show={show} color="white" /> | ||
</TooltipBase> | ||
</> | ||
) | ||
``` | ||
#### Props: | ||
##### Show* | ||
##### Children* | ||
##### Position (?) | ||
* bottom (default) | ||
* left | ||
* right | ||
* top | ||
##### Color (?) | ||
* dark (default) | ||
* white |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.