Skip to content
This repository has been archived by the owner on Aug 23, 2024. It is now read-only.

Commit

Permalink
Fix table button font
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffvli committed Feb 12, 2022
1 parent e9475a9 commit 85bd3d3
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 35 deletions.
72 changes: 38 additions & 34 deletions src/components/viewtypes/ListViewTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,11 @@ const StyledTable = styled(Table)<{ rowHeight: number; $isDragging: boolean }>`
}
.rs-table-row.playing {
color: ${(props) => props.theme.colors.primary};
color: ${(props) => props.theme.colors.primary} !important;
span {
color: ${(props) => props.theme.colors.primary} !important;
}
.rs-btn {
color: ${(props) => props.theme.colors.primary};
Expand Down Expand Up @@ -751,40 +755,40 @@ const ListViewTable = ({
</CombinedTitleTextWrapper>
</Row>
<Row className="row-sub-secondarytext">
<span>
{(rowData.artist || []).map((artist: GenericItem, i: number) => (
<span key={`${rowData.uniqueId}-${artist.id}`}>
<SecondaryTextWrapper key={nanoid()} subtitle="true">
{i > 0 && ', '}
</SecondaryTextWrapper>
<CustomTooltip
key={`artist-${rowData.uniqueId}-${artist.id}`}
text={artist.title}
>
<TableLinkButton
font={`${fontSize}px`}
subtitle="true"
onClick={(e: any) => {
if (!e.ctrlKey && !e.shiftKey) {
if (artist.id && !isModal) {
history.push(`/library/artist/${artist.id}`);
} else if (artist.id && isModal) {
dispatch(
addModalPage({
pageType: 'artist',
id: artist.id,
})
);
}
{rowData.artist.map((artist: GenericItem, i: number) => (
<SecondaryTextWrapper
subtitle="true"
key={`${rowData.uniqueId}-${artist.id}`}
style={{
fontFamily: configState.lookAndFeel.font,
fontSize: `${fontSize}px`,
}}
>
{i > 0 && ', '}
<CustomTooltip text={artist.title}>
<TableLinkButton
font={`${fontSize}px`}
subtitle="true"
onClick={(e: any) => {
if (!e.ctrlKey && !e.shiftKey) {
if (artist.id && !isModal) {
history.push(`/library/artist/${artist.id}`);
} else if (artist.id && isModal) {
dispatch(
addModalPage({
pageType: 'artist',
id: artist.id,
})
);
}
}}
>
{artist.title}
</TableLinkButton>
</CustomTooltip>
</span>
))}
</span>
}
}}
>
{artist.title}
</TableLinkButton>
</CustomTooltip>
</SecondaryTextWrapper>
))}
</Row>
</Col>
</Row>
Expand Down
2 changes: 1 addition & 1 deletion src/components/viewtypes/styled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const TableLinkButton = styled(Button)<{
active?: boolean;
font?: string;
}>`
font-size: ${(props) => props.fontsize};
font-size: ${(props) => props.font};
background: transparent;
max-width: 100%;
padding: 0px;
Expand Down

0 comments on commit 85bd3d3

Please sign in to comment.