1.1.5 • Published 10 months ago
noyan-layout v1.1.5
Installation
npm install noyan-layout
yarn add noyan-layoutAvailable Props in Header component
| Props | Types | Default | ||
|---|---|---|---|---|
| 1 | user | User, null, undefined | undefined | Optional |
| 2 | profileItems | Array<{ title: string; icon?: string; onClick?: () => void }> | -------- | Optional |
| 3 | onProfile | function | -------- | Optional |
| 4 | onLogout | function | -------- | Optional |
| 5 | onLegalLogin | function | -------- | Required |
| 6 | onRealLogin | function | -------- | Required |
- user is undefined, this means the login button is in loading mode.
- user is null, show login button.
- if user exist, open dropdown and show user firstName and user lastName and logout button.
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
10 months ago
1.1.4
11 months ago
1.1.3
12 months ago
1.1.2
12 months ago
1.1.1
1 year ago
1.1.0
1 year ago
1.0.29
1 year ago
1.0.28
1 year ago
1.0.27
1 year ago
1.0.26
1 year ago
1.0.25
1 year ago
1.0.24
1 year ago
1.0.23
1 year ago
1.0.22
1 year ago
1.0.21
1 year ago
1.0.20
1 year ago
1.0.19
1 year ago
1.0.17
1 year ago
1.0.16
1 year ago
1.0.15
1 year ago
1.0.14
1 year ago
1.0.13
1 year ago
1.0.12
1 year ago
1.0.10
1 year ago
1.0.8
1 year ago
1.0.7
1 year ago
1.0.6
1 year ago
1.0.5
1 year ago
1.0.4
1 year ago
1.0.3
1 year ago
1.0.2
1 year ago
1.0.1
1 year ago
1.0.0
1 year ago


