The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/client/components/Sidebar/Header.js

27 lines
692 B

import { Box, ActionButton } from '@rocket.chat/fuselage';
import React from 'react';
const Header = ({ title, onClose, children = undefined, ...props }) => (
<Box is='header' display='flex' flexDirection='column' pb='x16' {...props}>
{(title || onClose) && (
<Box
display='flex'
flexDirection='row'
alignItems='center'
pi='x24'
justifyContent='space-between'
flexGrow={1}
>
{title && (
<Box color='neutral-800' fontSize='p3' fontWeight='p3' flexShrink={1} withTruncatedText>
{title}
</Box>
)}
{onClose && <ActionButton ghost small icon='cross' onClick={onClose} />}
</Box>
)}
{children}
</Box>
);
export default Header;