feat: add back button in company details top bar (#729)
* feat: add back button in company details top bar Closes #636 * Add back button on person page --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -9,6 +9,7 @@ import { RightDrawerContainer } from './RightDrawerContainer';
|
||||
type OwnProps = {
|
||||
children: JSX.Element | JSX.Element[];
|
||||
title: string;
|
||||
hasBackButton?: boolean;
|
||||
icon: ReactNode;
|
||||
onAddButtonClick?: () => void;
|
||||
};
|
||||
@ -22,13 +23,19 @@ const StyledContainer = styled.div`
|
||||
export function WithTopBarContainer({
|
||||
children,
|
||||
title,
|
||||
hasBackButton,
|
||||
icon,
|
||||
onAddButtonClick,
|
||||
}: OwnProps) {
|
||||
return (
|
||||
<StyledContainer>
|
||||
<TopBarHotkeys onAddButtonClick={onAddButtonClick} />
|
||||
<TopBar title={title} icon={icon} onAddButtonClick={onAddButtonClick} />
|
||||
<TopBar
|
||||
title={title}
|
||||
hasBackButton={hasBackButton}
|
||||
icon={icon}
|
||||
onAddButtonClick={onAddButtonClick}
|
||||
/>
|
||||
<RightDrawerContainer topMargin={TOP_BAR_MIN_HEIGHT + 16 + 16}>
|
||||
{children}
|
||||
</RightDrawerContainer>
|
||||
|
||||
Reference in New Issue
Block a user