File size: 638 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { __experimentalHStack as HStack } from '@wordpress/components';
import './style.scss';

function Header( { as = 'div', children }: { as?: 'div' | 'header'; children?: React.ReactNode } ) {
	return (
		<HStack
			as={ as }
			className="dashboard-header-bar"
			alignment="left"
			spacing={ 2 }
			justify="flex-start"
		>
			{ children }
		</HStack>
	);
}

Header.Title = function HeaderBarTitle( { children }: { children: React.ReactNode } ) {
	return (
		<HStack
			style={ { width: 'auto', flexGrow: 1, flexShrink: 0 } }
			className="dashboard-header-bar-title"
		>
			{ children }
		</HStack>
	);
};

export default Header;