1.0.9 • Published 8 months ago

yefee-ui v1.0.9

Weekly downloads
-
License
ISC
Repository
-
Last release
8 months ago

Yefee-Ui

Yefee-ui is a react mini-library, right now yefee-ui have just 6 components, but it's lightweight, type safe & easy to use!

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
1.0.9

8 months ago

1.0.8

8 months ago

1.0.7

8 months ago

1.0.6

8 months ago

1.0.5

8 months ago

1.0.4

8 months ago

1.0.3

8 months ago

1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

9 months ago

0.1.4

9 months ago

0.1.3

9 months ago

0.1.2

9 months ago

0.1.1

9 months ago

0.1.0

9 months ago

0.0.9

9 months ago

0.0.8

9 months ago

0.0.7

9 months ago

0.0.6

9 months ago

0.0.5

10 months ago

0.0.4

10 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago