-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#3 Add main buttons to NavBar on Dashboard
- Loading branch information
Showing
4 changed files
with
46 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,16 @@ | ||
.App { | ||
text-align: center; | ||
.site-layout-content { | ||
min-height: 280px; | ||
padding: 24px; | ||
background: #fff; | ||
} | ||
|
||
.App-logo { | ||
height: 40vmin; | ||
pointer-events: none; | ||
#components-layout-demo-top .logo { | ||
float: left; | ||
width: 120px; | ||
height: 31px; | ||
margin: 16px 24px 16px 0; | ||
background: rgba(255, 255, 255, 0.3); | ||
} | ||
|
||
@media (prefers-reduced-motion: no-preference) { | ||
.App-logo { | ||
animation: App-logo-spin infinite 20s linear; | ||
} | ||
} | ||
|
||
.App-header { | ||
background-color: #282c34; | ||
min-height: 100vh; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
font-size: calc(10px + 2vmin); | ||
color: white; | ||
} | ||
|
||
.App-link { | ||
color: #61dafb; | ||
} | ||
|
||
@keyframes App-logo-spin { | ||
from { | ||
transform: rotate(0deg); | ||
} | ||
to { | ||
transform: rotate(360deg); | ||
} | ||
.ant-row-rtl #components-layout-demo-top .logo { | ||
float: right; | ||
margin: 16px 0 16px 24px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,37 @@ | ||
import { Layout, Menu, Breadcrumb } from 'antd'; | ||
import { | ||
DesktopOutlined, | ||
PieChartOutlined, | ||
FileOutlined, | ||
TeamOutlined, | ||
UserOutlined, | ||
} from '@ant-design/icons'; | ||
import { Button } from 'antd'; | ||
import { DashboardOutlined, MailOutlined } from '@ant-design/icons'; | ||
import { useState } from 'react'; | ||
import './App.css'; | ||
|
||
const { Header, Content, Footer, Sider } = Layout; | ||
const { Header, Content, Footer } = Layout; | ||
const { SubMenu } = Menu; | ||
|
||
function App () { | ||
const [collapsed, setCollapsed] = useState(false); | ||
|
||
return <Layout style={{ minHeight: '100vh' }}> | ||
<Sider collapsible collapsed={collapsed} onCollapse={setCollapsed}> | ||
<div className="logo" /> | ||
<Menu theme="dark" defaultSelectedKeys={['1']} mode="inline"> | ||
<Menu.Item key="1" icon={<PieChartOutlined />}> | ||
Option 1 | ||
</Menu.Item> | ||
<Menu.Item key="2" icon={<DesktopOutlined />}> | ||
Option 2 | ||
</Menu.Item> | ||
<SubMenu key="sub1" icon={<UserOutlined />} title="User"> | ||
<Menu.Item key="3">Tom</Menu.Item> | ||
<Menu.Item key="4">Bill</Menu.Item> | ||
<Menu.Item key="5">Alex</Menu.Item> | ||
</SubMenu> | ||
<SubMenu key="sub2" icon={<TeamOutlined />} title="Team"> | ||
<Menu.Item key="6">Team 1</Menu.Item> | ||
<Menu.Item key="8">Team 2</Menu.Item> | ||
</SubMenu> | ||
<Menu.Item key="9" icon={<FileOutlined />}> | ||
Files | ||
</Menu.Item> | ||
</Menu> | ||
</Sider> | ||
<Layout className="site-layout"> | ||
<Header className="site-layout-background" style={{ padding: 0 }} /> | ||
<Content style={{ margin: '0 16px' }}> | ||
<Breadcrumb style={{ margin: '16px 0' }}> | ||
<Breadcrumb.Item>User</Breadcrumb.Item> | ||
<Breadcrumb.Item>Bill</Breadcrumb.Item> | ||
</Breadcrumb> | ||
</Content> | ||
<Footer style={{ textAlign: 'center' }}>Ant Design ©2018 Created by Ant UED</Footer> | ||
</Layout> | ||
</Layout> | ||
return <Layout className="layout"> | ||
<Header> | ||
|
||
<Menu theme="dark" mode="horizontal" defaultSelectedKeys={['2']}> | ||
<Button type="primary" shape="round" icon={<MailOutlined />} style={{ margin: '0 50px' }} size={10}> | ||
Agendar Serviço | ||
</Button> | ||
<Button type="primary" shape="round" icon={<DashboardOutlined />} size={10}> | ||
Administração | ||
</Button> | ||
</Menu> | ||
</Header> | ||
<Content style={{ padding: '0 50px' }}> | ||
<Breadcrumb style={{ margin: '16px 0' }}> | ||
<Breadcrumb.Item>Home</Breadcrumb.Item> | ||
<Breadcrumb.Item>List</Breadcrumb.Item> | ||
<Breadcrumb.Item>App</Breadcrumb.Item> | ||
</Breadcrumb> | ||
<div className="site-layout-content">Content</div> | ||
</Content> | ||
<Footer style={{ textAlign: 'center' }}>Ant Design ©2021 Created by Ant UED</Footer> | ||
</Layout> | ||
} | ||
|
||
export default App |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import App from './components/App'; | ||
import { ConfigProvider } from 'antd'; | ||
import ptBR from 'antd/lib/locale/pt_BR'; | ||
import 'antd/dist/antd.css'; | ||
|
||
ReactDOM.render( | ||
<React.StrictMode> | ||
<App /> | ||
<ConfigProvider locale={ptBR}> | ||
<App /> | ||
</ConfigProvider> | ||
</React.StrictMode>, | ||
document.getElementById('root') | ||
); | ||
|
||
|
||
); |