This repository was archived by the owner on Mar 1, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33import * as React from "react" ;
44import { NavLink } from "react-router-dom" ;
55
6- import { Site } from "tabler-react" ;
6+ import { Site , Nav , Button } from "tabler-react" ;
77
88type Props = { |
99 + children : React . Node ,
@@ -140,6 +140,20 @@ class SiteWrapper extends React.Component<Props, void> {
140140 href : "/" ,
141141 alt : "Tabler React" ,
142142 imageURL : "./demo/brand/tabler.svg" ,
143+ navItems : (
144+ < Nav . Item type = "div" className = "d-none d-md-flex" >
145+ < Button
146+ href = "https://github.com/tabler/tabler-react"
147+ target = "_blank"
148+ outline
149+ size = "sm"
150+ RootComponent = "a"
151+ color = "primary"
152+ >
153+ Source code
154+ </ Button >
155+ </ Nav . Item >
156+ ) ,
143157 notificationsTray : { notificationsObjects } ,
144158 accountDropdown : accountDropdownProps ,
145159 } }
Original file line number Diff line number Diff line change 11// @flow
22
33import * as React from "react" ;
4- import {
5- Container ,
6- Site ,
7- Nav ,
8- Button ,
9- Notification ,
10- AccountDropdown ,
11- } from "../" ;
4+ import { Container , Site , Notification , AccountDropdown } from "../" ;
125import type { Props as NotificationTrayProps } from "../Notification/NotificationTray.react" ;
136import type { Props as AccountDropdownProps } from "../AccountDropdown/AccountDropdown.react" ;
147
@@ -31,6 +24,7 @@ export type Props = {|
3124 */
3225 + notificationsTray ? : NotificationTrayProps ,
3326 + accountDropdown ? : AccountDropdownProps ,
27+ + navItems ? : React . Node ,
3428| } ;
3529
3630/**
@@ -44,6 +38,7 @@ const SiteHeader = ({
4438 alt,
4539 notificationsTray : notificationsTrayFromProps ,
4640 accountDropdown : accountDropdownFromProps ,
41+ navItems,
4742} : Props ) : React . Node => {
4843 const notificationsTray =
4944 notificationsTrayFromProps &&
@@ -61,19 +56,7 @@ const SiteHeader = ({
6156 < React . Fragment >
6257 < Site . Logo href = { href } alt = { alt } src = { imageURL } />
6358 < div className = "d-flex order-lg-2 ml-auto" >
64- < Nav . Item type = "div" className = "d-none d-md-flex" >
65- < Button
66- href = "https://github.com/tabler/tabler-react"
67- target = "_blank"
68- outline
69- size = "sm"
70- RootComponent = "a"
71- color = "primary"
72- >
73- Source code
74- </ Button >
75- </ Nav . Item >
76-
59+ { navItems }
7760 { notificationsTray }
7861 { accountDropdown }
7962 </ div >
You can’t perform that action at this time.
0 commit comments