jeffvli
3 years ago
3 changed files with 102 additions and 14 deletions
@ -0,0 +1,58 @@ |
|||||
|
import React, { useState } from 'react'; |
||||
|
import { |
||||
|
IconButton, |
||||
|
ButtonGroup, |
||||
|
ButtonToolbar, |
||||
|
Icon, |
||||
|
Input, |
||||
|
InputGroup, |
||||
|
} from 'rsuite'; |
||||
|
|
||||
|
const GenericPageHeader = ({ |
||||
|
title, |
||||
|
tags, |
||||
|
handleSearch, |
||||
|
showViewTypeButtons, |
||||
|
}: any) => { |
||||
|
return ( |
||||
|
<> |
||||
|
<div |
||||
|
style={{ |
||||
|
display: 'flex', |
||||
|
justifyContent: 'space-between', |
||||
|
}} |
||||
|
> |
||||
|
<span> |
||||
|
<h1>{title}</h1> |
||||
|
</span> |
||||
|
<span |
||||
|
style={{ |
||||
|
alignSelf: 'center', |
||||
|
}} |
||||
|
> |
||||
|
<InputGroup inside> |
||||
|
<Input size="md" onChange={handleSearch} /> |
||||
|
<InputGroup.Addon> |
||||
|
<Icon icon="search" /> |
||||
|
</InputGroup.Addon> |
||||
|
</InputGroup> |
||||
|
</span> |
||||
|
</div> |
||||
|
<div style={{ display: 'flex', justifyContent: 'space-between' }}> |
||||
|
<span style={{ alignSelf: 'center' }}>{tags}</span> |
||||
|
{showViewTypeButtons && ( |
||||
|
<span style={{ alignSelf: 'center' }}> |
||||
|
<ButtonToolbar> |
||||
|
<ButtonGroup> |
||||
|
<IconButton icon={<Icon icon="list" />} appearance="link" /> |
||||
|
<IconButton icon={<Icon icon="th-large" />} appearance="link" /> |
||||
|
</ButtonGroup> |
||||
|
</ButtonToolbar> |
||||
|
</span> |
||||
|
)} |
||||
|
</div> |
||||
|
</> |
||||
|
); |
||||
|
}; |
||||
|
|
||||
|
export default GenericPageHeader; |
@ -1,3 +1,11 @@ |
|||||
.container__page { |
.container__page { |
||||
padding: 1rem 1rem 6rem 1rem; |
padding: 0px 0px 95px 0px; |
||||
|
} |
||||
|
|
||||
|
.page__header { |
||||
|
padding: 20px 20px 0px 20px; |
||||
|
} |
||||
|
|
||||
|
.page__content { |
||||
|
padding: 10px; |
||||
} |
} |
||||
|
Loading…
Reference in new issue