mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2025-01-03 14:57:22 +03:00
Created separated component with servers dropdown
This commit is contained in:
parent
2cad352045
commit
b1e97ef022
2 changed files with 28 additions and 27 deletions
|
@ -1,20 +1,11 @@
|
|||
import plusIcon from '@fortawesome/fontawesome-free-solid/faPlus';
|
||||
import FontAwesomeIcon from '@fortawesome/react-fontawesome';
|
||||
import React from 'react';
|
||||
import {
|
||||
Collapse, DropdownItem, DropdownMenu,
|
||||
DropdownToggle,
|
||||
Nav,
|
||||
Navbar,
|
||||
NavbarBrand,
|
||||
NavbarToggler,
|
||||
NavItem,
|
||||
NavLink,
|
||||
UncontrolledDropdown
|
||||
} from 'reactstrap';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { Collapse, Nav, Navbar, NavbarBrand, NavbarToggler, NavItem, NavLink } from 'reactstrap';
|
||||
import ServersDropdown from '../servers/ServersDropdown';
|
||||
import './MainHeader.scss';
|
||||
import shlinkLogo from './shlink-logo-white.png';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
export default class MainHeader extends React.Component {
|
||||
constructor(props) {
|
||||
|
@ -45,20 +36,7 @@ export default class MainHeader extends React.Component {
|
|||
<FontAwesomeIcon icon={plusIcon}/> Add server
|
||||
</NavLink>
|
||||
</NavItem>
|
||||
<UncontrolledDropdown nav>
|
||||
<DropdownToggle nav caret>
|
||||
Servers
|
||||
</DropdownToggle>
|
||||
|
||||
<DropdownMenu>
|
||||
<DropdownItem>
|
||||
Server 1
|
||||
</DropdownItem>
|
||||
<DropdownItem>
|
||||
Server 2
|
||||
</DropdownItem>
|
||||
</DropdownMenu>
|
||||
</UncontrolledDropdown>
|
||||
<ServersDropdown />
|
||||
</Nav>
|
||||
</Collapse>
|
||||
</Navbar>
|
||||
|
|
23
src/servers/ServersDropdown.js
Normal file
23
src/servers/ServersDropdown.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
import React from 'react';
|
||||
import { DropdownItem, DropdownMenu, DropdownToggle, UncontrolledDropdown } from 'reactstrap';
|
||||
|
||||
export default class ServersDropdown extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<UncontrolledDropdown nav>
|
||||
<DropdownToggle nav caret>
|
||||
Servers
|
||||
</DropdownToggle>
|
||||
|
||||
<DropdownMenu>
|
||||
<DropdownItem>
|
||||
Server 1 foo
|
||||
</DropdownItem>
|
||||
<DropdownItem>
|
||||
Server 2 foo
|
||||
</DropdownItem>
|
||||
</DropdownMenu>
|
||||
</UncontrolledDropdown>
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue