From 0f2aa5ed38b1770ca360a1a908e4ea0f9ee2a390 Mon Sep 17 00:00:00 2001 From: Lautaro Petaccio <1120791+LautaroPetaccio@users.noreply.github.com> Date: Wed, 10 Jul 2024 10:44:25 -0300 Subject: [PATCH] fix: Change SelectField CSS to match input height (#545) --- src/components/SelectField/SelectField.css | 6 ++--- src/components/SelectField/SelectField.tsx | 31 +++++++++++++--------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/src/components/SelectField/SelectField.css b/src/components/SelectField/SelectField.css index 00dc72cd..04218b7d 100644 --- a/src/components/SelectField/SelectField.css +++ b/src/components/SelectField/SelectField.css @@ -7,7 +7,7 @@ border-radius: 0px; border: none; border-bottom: 2px solid var(--divider); - padding: 2px 0px 12px 0px; + padding: 2px 0px 0px 0px; width: 100%; margin-top: 8px; min-height: 40px; @@ -37,7 +37,7 @@ font-size: 20px; font-weight: 500; font-family: var(--font-family); - line-height: 18px; + line-height: 30px; } .dcl.select-field .ui.dropdown > .default.text { @@ -57,7 +57,7 @@ .dcl.select-field .ui.dropdown .dropdown.icon { padding-right: 0px; - padding-top: 4px; + padding-bottom: 0px; color: var(--text); } diff --git a/src/components/SelectField/SelectField.tsx b/src/components/SelectField/SelectField.tsx index 6228d78a..7dc79225 100644 --- a/src/components/SelectField/SelectField.tsx +++ b/src/components/SelectField/SelectField.tsx @@ -1,4 +1,5 @@ import * as React from 'react' +import classNames from 'classnames' import { Dropdown, DropdownProps } from '../Dropdown/Dropdown' import { Header } from '../Header/Header' import './SelectField.css' @@ -13,20 +14,26 @@ export type SelectFieldProps = DropdownProps & { export class SelectField extends React.PureComponent { render(): JSX.Element { - const { label, header, options, message, error, border, ...rest } = - this.props - let classes = 'dcl select-field' - - if (error) { - classes += ' error warning circle' - } - - if (border) { - classes += ' border' - } + const { + label, + header, + options, + message, + error, + border, + className, + ...rest + } = this.props return ( -
+
{label ?
{label}
: null}