@chayns-components/core
Version:
A set of beautiful React components for developing your own applications with chayns.
103 lines (99 loc) • 2.47 kB
JavaScript
import styled, { css } from 'styled-components';
export const StyledComboBoxItem = styled.div`
align-items: center;
background-color: ${({
theme,
$isSelected
}) => $isSelected && theme['secondary-102']};
color: ${({
theme
}) => theme.text};
display: flex;
flex: 0 0 auto;
gap: 10px;
min-height: 38px;
padding: 8px 10px;
transition: background-color 0.2s ease-in-out;
${({
$isDisabled
}) => $isDisabled && css`
opacity: 0.5;
pointer-events: none;
`}
${({
$isDisabled,
$isTouch,
theme
}) => !$isDisabled && !$isTouch && css`
&:hover {
background-color: ${theme['secondary-101']};
}
&:focus {
background-color: ${theme['secondary-101']};
}
`}
`;
export const StyledComboBoxItemImage = styled.img`
${({
$shouldShowRoundImage
}) => $shouldShowRoundImage && css`
border-radius: 50%;
`}
background: ${({
$background,
theme
}) => $background || `rgba(${theme['text-rgb'] ?? '0,0,0'}, 0.1)`};
box-shadow: 0 0 0 1px
rgba(${({
theme
}) => theme['009-rgb']}, 0.15);
flex: 0 0 auto;
height: ${({
$shouldShowBigImage
}) => $shouldShowBigImage ? '40px' : '22px'};
object-fit: cover;
width: ${({
$shouldShowBigImage
}) => $shouldShowBigImage ? '40px' : '22px'};
`;
export const StyledComboBoxItemIconsWrapper = styled.div`
align-items: center;
display: flex;
flex: 0 0 auto;
height: 100%;
justify-content: center;
width: 20px;
`;
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