Components: Combobox: add withoutPadding
This commit is contained in:
parent
bad353a3f3
commit
b41d5f911e
@ -113,6 +113,7 @@ class ComboBox extends React.Component {
|
|||||||
withBackground,
|
withBackground,
|
||||||
advancedOptionsCount,
|
advancedOptionsCount,
|
||||||
isMobileView,
|
isMobileView,
|
||||||
|
withoutPadding,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
const { tabIndex, ...props } = this.props;
|
const { tabIndex, ...props } = this.props;
|
||||||
@ -168,6 +169,7 @@ class ComboBox extends React.Component {
|
|||||||
toggleAction={toggleAction}
|
toggleAction={toggleAction}
|
||||||
isOpen={isOpen}
|
isOpen={isOpen}
|
||||||
disableMobileView={disableMobileView}
|
disableMobileView={disableMobileView}
|
||||||
|
withoutPadding={withoutPadding}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
<ComboButton
|
<ComboButton
|
||||||
@ -315,6 +317,7 @@ ComboBox.propTypes = {
|
|||||||
/**Count of advanced options */
|
/**Count of advanced options */
|
||||||
advancedOptionsCount: PropTypes.number,
|
advancedOptionsCount: PropTypes.number,
|
||||||
tabIndex: PropTypes.number,
|
tabIndex: PropTypes.number,
|
||||||
|
withoutPadding: PropTypes.bool,
|
||||||
};
|
};
|
||||||
|
|
||||||
ComboBox.defaultProps = {
|
ComboBox.defaultProps = {
|
||||||
@ -335,6 +338,7 @@ ComboBox.defaultProps = {
|
|||||||
isExternalLink: false,
|
isExternalLink: false,
|
||||||
modernView: false,
|
modernView: false,
|
||||||
tabIndex: -1,
|
tabIndex: -1,
|
||||||
|
withoutPadding: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default ComboBox;
|
export default ComboBox;
|
||||||
|
@ -13,7 +13,7 @@ const StyledComboBox = styled.div`
|
|||||||
position: relative;
|
position: relative;
|
||||||
outline: 0;
|
outline: 0;
|
||||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||||
padding: 4px 0;
|
padding: ${(props) => (props.withoutPadding ? "0" : "4px 0")};
|
||||||
|
|
||||||
${(props) =>
|
${(props) =>
|
||||||
props.isOpen &&
|
props.isOpen &&
|
||||||
|
Loading…
Reference in New Issue
Block a user