@chayns-components/core
Version:
A set of beautiful React components for developing your own applications with chayns.
120 lines (116 loc) • 2.58 kB
JavaScript
import styled, { css } from 'styled-components';
export const StyledComboBoxItem = styled.div`
align-items: center;
background-color: ${_ref => {
let {
theme,
$isSelected
} = _ref;
return $isSelected && theme['secondary-102'];
}};
color: ${_ref2 => {
let {
theme
} = _ref2;
return theme.text;
}};
display: flex;
gap: 10px;
padding: 8px 10px;
transition: background-color 0.2s ease-in-out;
${_ref3 => {
let {
$isDisabled
} = _ref3;
return $isDisabled && css`
opacity: 0.5;
pointer-events: none;
`;
}}
${_ref4 => {
let {
$isDisabled,
$isTouch,
theme
} = _ref4;
return !$isDisabled && !$isTouch && css`
&:hover {
background-color: ${theme['secondary-101']};
}
&:focus {
background-color: ${theme['secondary-101']};
}
`;
}}
`;
export const StyledComboBoxItemImage = styled.img`
${_ref5 => {
let {
$shouldShowRoundImage
} = _ref5;
return $shouldShowRoundImage && css`
border-radius: 50%;
`;
}}
background: ${_ref6 => {
let {
$background,
theme
} = _ref6;
return $background || `rgba(${theme['text-rgb'] ?? '0,0,0'}, 0.1)`;
}};
box-shadow: 0 0 0 1px
rgba(${_ref7 => {
let {
theme
} = _ref7;
return theme['009-rgb'];
}}, 0.15);
flex: 0 0 auto;
height: ${_ref8 => {
let {
$shouldShowBigImage
} = _ref8;
return $shouldShowBigImage ? '40px' : '22px';
}};
object-fit: cover;
width: ${_ref9 => {
let {
$shouldShowBigImage
} = _ref9;
return $shouldShowBigImage ? '40px' : '22px';
}};
`;
export const StyledComboBoxItemContent = styled.div`
display: flex;
flex: 1 1 auto;
flex-direction: column;
line-height: normal;
min-width: 0;
width: 100%;
`;
export const StyledComboBoxItemContentHeader = styled.div`
align-items: center;
display: flex;
justify-content: space-between;
`;
export const StyledComboBoxItemContentHeaderWrapper = styled.div`
display: flex;
flex: 1 1 auto;
gap: 4px;
min-width: 0;
`;
export const StyledComboBoxItemContentHeaderWrapperText = styled.div`
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
`;
export const StyledComboBoxItemContentHeaderRightElement = styled.div`
align-items: center;
display: flex;
`;
export const StyledComboBoxItemContentSubtext = styled.div`
font-size: 85%;
margin-top: 2px;
`;
//# sourceMappingURL=ComboBoxItem.styles.js.map