Skip to content
Open
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
1 change: 1 addition & 0 deletions dashboard/src/components/porter/Filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ const Filter: React.FC<Props> = ({
options={filter.default ? [filter.default, ...filter.options] : filter.options}
setValue={filter.setValue}
value={selectedFilterValues[filter.name]}
width="200px"
/>
{i !== filters.length - 1 && <Spacer y={0.5} />}
</React.Fragment>
Expand Down
8 changes: 5 additions & 3 deletions dashboard/src/components/porter/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type Props = {
value?: string;
setValue?: (value: string) => void;
prefix?: React.ReactNode;
width?: string;
};

const Select: React.FC<Props> = ({
Expand All @@ -31,11 +32,12 @@ const Select: React.FC<Props> = ({
value,
setValue,
prefix,
width,
}) => {
return (
<div>
{label && <Label color={labelColor}>{label}</Label>}
<SelectWrapper>
<SelectWrapper width={width}>
{prefix && (
<>
<Prefix>{prefix}</Prefix>
Expand Down Expand Up @@ -123,7 +125,7 @@ const Error = styled.div`
}
`;

const SelectWrapper = styled.div`
const SelectWrapper = styled.div<{ width?: string }>`
position: relative;
padding-left: 10px;
padding-right: 28px;
Expand All @@ -140,7 +142,7 @@ const SelectWrapper = styled.div`
border-radius: 5px;
font-size: 13px;
overflow: hidden;

width: ${(props) => props.width};
display: flex;
align-items: center;
> img {
Expand Down
2 changes: 1 addition & 1 deletion dashboard/src/components/porter/Spacer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const Spacer: React.FC<Props> = ({
return null
};

const getCalcWidth = () => {
const getCalcWidth = (): string => {
if (x) {
return 15 * x + "px";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { search } from "shared/search";
import { readableDate } from "shared/string_utils";
import engine from "assets/computer-chip.svg";
import databaseGrad from "assets/database-grad.svg";
import database from "assets/database.svg";
import grid from "assets/grid.png";
import list from "assets/list.png";
import notFound from "assets/not-found.png";
Expand Down Expand Up @@ -203,8 +204,8 @@ const DatabaseDashboard: React.FC = () => {
}}
prefix={
<Container row>
<Image src={databaseGrad} size={15} opacity={0.6} />
<Spacer inline x={0.5} />
<Image src={database} size={15} opacity={0.5} />
<Spacer inline width="25px" />
Type
</Container>
}
Expand Down Expand Up @@ -243,7 +244,7 @@ const DatabaseDashboard: React.FC = () => {
prefix={
<Container row>
<Image src={engine} size={15} opacity={0.6} />
<Spacer inline x={0.5} />
<Spacer inline width="22px" />
Engine
</Container>
}
Expand Down