1.1.5 • Published 5 months ago

noyan-layout v1.1.5

Weekly downloads
-
License
-
Repository
-
Last release
5 months ago

Installation

npm install noyan-layout

yarn add noyan-layout

Available Props in Header component

PropsTypesDefault
1userUser, null, undefinedundefinedOptional
2profileItemsArray<{ title: string; icon?: string; onClick?: () => void }>--------Optional
3onProfilefunction--------Optional
4onLogoutfunction--------Optional
5onLegalLoginfunction--------Required
6onRealLoginfunction--------Required
  • user is undefined, this means the login button is in loading mode.

user-undefined.png

  • user is null, show login button.

user-null.png

  • if user exist, open dropdown and show user firstName and user lastName and logout button.

user-user.png

Simple Usage

// Add this in the component you want to use
import { NoyanHeader, NoyanFooter } from "noyan-layout";
import "noyan-layout/dist/style.css";

import MessageIcon from "/images/message.png";

const App = () => {
    return (
        <>
            <NoyanHeader
                user={null} // optional
                profileItems={[{ title: "آیتم مورد نظر", icon: MessageIcon, onClick: "your function" }]} // optional
                onLegalLogin={() => console.log("legal")} // required
                onRealLogin={() => console.log("real")} // required
                onProfile={() => console.log("click profile")} // optional
                onLogout={() => console.log("click logout")} // optional
            />

            <NoyanFooter />
        </>
    );
};
1.1.5

5 months ago

1.1.4

6 months ago

1.1.3

7 months ago

1.1.2

7 months ago

1.1.1

8 months ago

1.1.0

8 months ago

1.0.29

8 months ago

1.0.28

8 months ago

1.0.27

8 months ago

1.0.26

8 months ago

1.0.25

8 months ago

1.0.24

8 months ago

1.0.23

8 months ago

1.0.22

8 months ago

1.0.21

8 months ago

1.0.20

8 months ago

1.0.19

8 months ago

1.0.17

8 months ago

1.0.16

8 months ago

1.0.15

8 months ago

1.0.14

8 months ago

1.0.13

8 months ago

1.0.12

8 months ago

1.0.10

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

8 months ago