Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix multi-schema data selector header styling #40101

Merged
merged 2 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ const TableBreadcrumbs = ({ schemaId, onBack }: TableBreadcrumbsProps) => {
<Icon name="chevronleft" size={10} />
{t`Schemas`}
</BackIconContainer>
<span className="mx1">-</span>
<span className="mx1">/</span>
<span>{getSchemaName(schemaId)}</span>
</h4>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,12 @@ export const DataSelectorTablePickerHeaderClickable = styled.span<Props>`

export const DataSelectorTablePickerHeaderDatabaseName = styled.span`
flex-wrap: wrap;
margin-left: ${space(1)};
margin-inline-start: ${space(1)};
`;

export const DataSelectorTablePickerHeaderSchemaName = styled.span`
color: ${color("text-medium")};
flex-wrap: wrap;
margin-left: ${space(1)};
`;

export const LinkToDocsContainer = styled.div`
Expand All @@ -47,3 +46,9 @@ export const NoTablesFound = styled.div`
padding: ${space(4)};
text-align: center;
`;

export const DataSelectorHeaderDivider = styled.span`
color: ${color("text-medium")};
display: inline-block;
margin-inline: ${space(1)};
`;
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import {
DataSelectorTablePickerHeaderSchemaName as HeaderSchemaName,
LinkToDocsContainer,
NoTablesFound,
DataSelectorHeaderDivider,
} from "./DataSelectorTablePicker.styled";

type DataSelectorTablePickerProps = {
Expand Down Expand Up @@ -186,10 +187,12 @@ const Header = ({
</HeaderClickable>

{selectedSchema?.name && schemas.length > 1 && (
<HeaderSchemaName>
{"- "}
<span data-testid="source-schema">{selectedSchema.displayName()}</span>
</HeaderSchemaName>
<>
<DataSelectorHeaderDivider>/</DataSelectorHeaderDivider>
<HeaderSchemaName data-testid="source-schema">
{selectedSchema.displayName()}
</HeaderSchemaName>
</>
)}
</HeaderContainer>
);
Expand Down
Loading