Skip to content
Snippets Groups Projects
Unverified Commit 8b0fe5b6 authored by Anton Kulyk's avatar Anton Kulyk Committed by GitHub
Browse files

Fix dashboard filter width in edit mode (#36483)

* Use `minWidth` instead of `width`

* Reserve left padding for the settings icon
parent 79074fa7
Branches
Tags
No related merge requests found
/* eslint-disable react/prop-types */
import { Component } from "react";
import PropTypes from "prop-types";
import { Icon } from "metabase/core/components/Icon";
import ParameterValueWidget from "../ParameterValueWidget";
import {
ParameterContainer,
ParameterFieldSet,
SettingsIcon,
} from "./ParameterWidget.styled";
export class ParameterWidget extends Component {
......@@ -109,7 +109,7 @@ export class ParameterWidget extends Component {
{dragHandle}
</div>
{parameter.name}
<Icon className="flex-align-right" name="gear" size={16} />
<SettingsIcon name="gear" size={16} />
</ParameterContainer>
);
......
import styled from "@emotion/styled";
import FieldSet from "metabase/components/FieldSet";
import { Icon } from "metabase/core/components/Icon";
import { color } from "metabase/lib/colors";
interface ParameterFieldSetProps {
......@@ -43,7 +44,7 @@ export const ParameterContainer = styled.div<ParameterContainerProps>`
border-radius: 0.5rem;
cursor: pointer;
font-weight: bold;
width: 170px;
min-width: 170px;
margin-right: 0.5rem;
margin-bottom: 0.5rem;
padding: 0.5rem;
......@@ -51,3 +52,8 @@ export const ParameterContainer = styled.div<ParameterContainerProps>`
background-color: ${props =>
props.isEditingParameter ? color("brand") : color("white")};
`;
export const SettingsIcon = styled(Icon)`
margin-left: auto;
padding-left: 1rem;
`;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment