Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions web/packages/teleport/src/JoinTokens/JoinTokens.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ export const JoinTokens = () => {

function getRowStyle(row: JoinToken): React.CSSProperties {
if (row.isCloudSystem) {
return { background: theme.colors.interactive.tonal.neutral[0] };
return {
background: theme.colors.interactive.tonal.neutral[0],
color: theme.colors.text.muted,
};
}
}

Expand Down Expand Up @@ -184,7 +187,7 @@ export const JoinTokens = () => {
<Alert kind="danger">{joinTokensAttempt.statusText}</Alert>
)}
{joinTokensAttempt.status === 'success' && (
<Table
<JoinTokenTable
isSearchable
data={joinTokensAttempt.data.items}
row={{
Expand Down Expand Up @@ -324,6 +327,15 @@ export const JoinTokens = () => {
);
};

// This is necessary because the Table component styles
// hard-code the text color for the <td> element, preventing
// our row style from being applied.
const JoinTokenTable = styled(Table)`
& > tbody > tr > td {
color: inherit;
}
` as typeof Table;

export function searchMatcher(
targetValue: any,
searchValue: string,
Expand Down Expand Up @@ -384,7 +396,7 @@ const StyledLabel = styled(Label)`
margin: 1px 0;
margin-right: ${props => props.theme.space[2]}px;
background-color: ${props => props.theme.colors.interactive.tonal.neutral[0]};
color: ${props => props.theme.colors.text.main};
color: inherit;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
Expand Down
Loading