mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-09 20:29:36 +02:00
Fix custom header text positioning to match originals
This commit is contained in:
@@ -14,7 +14,7 @@ type Options = {
|
|||||||
preset?: Presets;
|
preset?: Presets;
|
||||||
};
|
};
|
||||||
|
|
||||||
const HeaderWrapper = styled.div<{ position: Options['position'] }>`
|
export const HeaderWrapper = styled.div<{ position: Options['position'] }>`
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: ${(props) =>
|
justify-content: ${(props) =>
|
||||||
props.position === 'right'
|
props.position === 'right'
|
||||||
@@ -27,10 +27,12 @@ const HeaderWrapper = styled.div<{ position: Options['position'] }>`
|
|||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const TextHeaderWrapper = styled(_Text)<{ position: Options['position'] }>`
|
const HeaderText = styled(_Text)<{ position: Options['position'] }>`
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
color: var(--ag-header-foreground-color);
|
color: var(--ag-header-foreground-color);
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
line-height: inherit;
|
||||||
text-align: ${(props) =>
|
text-align: ${(props) =>
|
||||||
props.position === 'right'
|
props.position === 'right'
|
||||||
? 'flex-end'
|
? 'flex-end'
|
||||||
@@ -82,13 +84,15 @@ export const GenericTableHeader = (
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<TextHeaderWrapper
|
<HeaderWrapper position={position}>
|
||||||
overflow="hidden"
|
<HeaderText
|
||||||
position={position}
|
overflow="hidden"
|
||||||
weight={500}
|
position={position}
|
||||||
>
|
weight={500}
|
||||||
{children || displayName}
|
>
|
||||||
</TextHeaderWrapper>
|
{children || displayName}
|
||||||
|
</HeaderText>
|
||||||
|
</HeaderWrapper>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user