some more changes
This commit is contained in:
22
assets/src/components/Header/Header.tsx
Normal file
22
assets/src/components/Header/Header.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import React from "react";
|
||||
import { DividerWrapper, HeaderWrapper } from "./styled";
|
||||
|
||||
import { WiredDivider } from "wired-elements-react";
|
||||
|
||||
export interface IWrapper {
|
||||
title: string;
|
||||
}
|
||||
const Header: React.FC<IWrapper> = ({ title }) => {
|
||||
return (
|
||||
<>
|
||||
<HeaderWrapper>
|
||||
<h1>{title}</h1>
|
||||
<DividerWrapper>
|
||||
<WiredDivider />
|
||||
</DividerWrapper>
|
||||
</HeaderWrapper>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default Header;
|
||||
23
assets/src/components/Header/styled.tsx
Normal file
23
assets/src/components/Header/styled.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
import styled from "styled-components";
|
||||
|
||||
export const HeaderWrapper = styled.div`
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: var(--navbar-width);
|
||||
height: var(--toolbar-height);
|
||||
width: 100%;
|
||||
& > h1 {
|
||||
padding: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
}
|
||||
`;
|
||||
|
||||
export const DividerWrapper = styled.div`
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
width: calc(100% + var(--navbar-width));
|
||||
left: calc(0px - var(--navbar-width));
|
||||
z-index: 999999999;
|
||||
`;
|
||||
Reference in New Issue
Block a user