Commit 767a414a authored by Chunchi Che's avatar Chunchi Che

add player status in layout

parent 561af3a7
Pipeline #20440 passed with stages
in 5 minutes and 8 seconds
...@@ -7,10 +7,9 @@ const { Header, Footer, Sider, Content } = Layout; ...@@ -7,10 +7,9 @@ const { Header, Footer, Sider, Content } = Layout;
const headerStyle: React.CSSProperties = { const headerStyle: React.CSSProperties = {
textAlign: "center", textAlign: "center",
alignContent: "center",
color: "#fff", color: "#fff",
height: layoutConfig.header.height, height: layoutConfig.header.height,
paddingInline: 50,
lineHeight: "64px",
}; };
const contentStyle: React.CSSProperties = { const contentStyle: React.CSSProperties = {
......
...@@ -25,6 +25,7 @@ import NeosConfig from "../../../neos.config.json"; ...@@ -25,6 +25,7 @@ import NeosConfig from "../../../neos.config.json";
import DuelTimeLine from "./timeLine"; import DuelTimeLine from "./timeLine";
import { Row } from "antd"; import { Row } from "antd";
import SendBox from "./sendBox"; import SendBox from "./sendBox";
import PlayerStatus from "./status";
// Ref: https://github.com/brianzinn/react-babylonjs/issues/126 // Ref: https://github.com/brianzinn/react-babylonjs/issues/126
const NeosDuel = () => { const NeosDuel = () => {
...@@ -47,9 +48,9 @@ const NeosDuel = () => { ...@@ -47,9 +48,9 @@ const NeosDuel = () => {
<> <>
<NeosLayout <NeosLayout
sider={<NeosSider />} sider={<NeosSider />}
header={<div>header</div>} header={<PlayerStatus />}
content={<NeosCanvas />} content={<NeosCanvas />}
footer={<div>footer</div>} footer={<PlayerStatus />}
/> />
<CardModal /> <CardModal />
<CardListModal /> <CardListModal />
......
import React from "react";
import { UserOutlined, BackwardOutlined } from "@ant-design/icons";
import { Avatar, Space, Statistic } from "antd";
const spaceSize = 20;
const avatarSize = 40;
const PlayerStatus = () => (
<Space size={spaceSize} direction="horizontal">
<Space wrap size={spaceSize}>
<Avatar size={avatarSize} icon={<UserOutlined />} />
</Space>
<Space wrap size={spaceSize}>
UserName
</Space>
<Space wrap size={spaceSize}>
<Statistic title="Hp" value={4000} />
</Space>
<Space wrap size={spaceSize}>
<Avatar
size={avatarSize}
style={{ color: "red" }}
icon={<BackwardOutlined />}
/>
</Space>
</Space>
);
export default PlayerStatus;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment