Components: Combobox: add withoutPadding

This commit is contained in:
Viktor Fomin 2023-01-26 21:39:27 +03:00
parent bad353a3f3
commit b41d5f911e
2 changed files with 5 additions and 1 deletions

View File

@ -113,6 +113,7 @@ class ComboBox extends React.Component {
withBackground,
advancedOptionsCount,
isMobileView,
withoutPadding,
} = this.props;
const { tabIndex, ...props } = this.props;
@ -168,6 +169,7 @@ class ComboBox extends React.Component {
toggleAction={toggleAction}
isOpen={isOpen}
disableMobileView={disableMobileView}
withoutPadding={withoutPadding}
{...props}
>
<ComboButton
@ -315,6 +317,7 @@ ComboBox.propTypes = {
/**Count of advanced options */
advancedOptionsCount: PropTypes.number,
tabIndex: PropTypes.number,
withoutPadding: PropTypes.bool,
};
ComboBox.defaultProps = {
@ -335,6 +338,7 @@ ComboBox.defaultProps = {
isExternalLink: false,
modernView: false,
tabIndex: -1,
withoutPadding: false,
};
export default ComboBox;

View File

@ -13,7 +13,7 @@ const StyledComboBox = styled.div`
position: relative;
outline: 0;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
padding: 4px 0;
padding: ${(props) => (props.withoutPadding ? "0" : "4px 0")};
${(props) =>
props.isOpen &&