Feature/edit name from show page (#806)
* Enable company name edition from page * Enable editing persons as well * Add styling for titles * Better manage style with inheritance * Add stories for poeple editable fields * Remove failing test * Revert "Remove failing test" This reverts commit 02cdeeba64276a26f93cf4af94f5857e47d36fff. * Fix test * Update name * Fix location * Rename tests * Fix stories
This commit is contained in:
@ -16,6 +16,7 @@ type OwnProps = {
|
||||
logoOrAvatar?: string;
|
||||
title: string;
|
||||
date: string;
|
||||
renderTitleEditComponent?: () => JSX.Element;
|
||||
};
|
||||
|
||||
const StyledShowPageSummaryCard = styled.div`
|
||||
@ -45,7 +46,6 @@ const StyledTitle = styled.div`
|
||||
color: ${({ theme }) => theme.font.color.primary};
|
||||
font-size: ${({ theme }) => theme.font.size.xl};
|
||||
font-weight: ${({ theme }) => theme.font.weight.semiBold};
|
||||
|
||||
max-width: 100%;
|
||||
`;
|
||||
|
||||
@ -65,6 +65,7 @@ export function ShowPageSummaryCard({
|
||||
logoOrAvatar,
|
||||
title,
|
||||
date,
|
||||
renderTitleEditComponent,
|
||||
}: OwnProps) {
|
||||
const beautifiedCreatedAt =
|
||||
date !== '' ? beautifyPastDateRelativeToNow(date) : '';
|
||||
@ -82,7 +83,11 @@ export function ShowPageSummaryCard({
|
||||
/>
|
||||
<StyledInfoContainer>
|
||||
<StyledTitle>
|
||||
<OverflowingTextWithTooltip text={title} />
|
||||
{renderTitleEditComponent ? (
|
||||
renderTitleEditComponent()
|
||||
) : (
|
||||
<OverflowingTextWithTooltip text={title} />
|
||||
)}
|
||||
</StyledTitle>
|
||||
<StyledDate id={dateElementId}>
|
||||
Added {beautifiedCreatedAt} ago
|
||||
|
||||
Reference in New Issue
Block a user