@chayns-components/core
Version:
A set of beautiful React components for developing your own applications with chayns.
152 lines (147 loc) • 3.03 kB
JavaScript
import { motion } from 'motion/react';
import styled from 'styled-components';
export const StyledSliderButton = styled.div`
opacity: ${_ref => {
let {
$isDisabled
} = _ref;
return $isDisabled ? 0.5 : 1;
}};
width: 100%;
touch-action: none;
position: relative;
`;
export const StyledSliderButtonWrapper = styled.div`
align-items: center;
background-color: ${_ref2 => {
let {
theme
} = _ref2;
return theme['408'];
}};
border-radius: 3px;
border: none;
color: white;
cursor: pointer;
display: inline-flex;
line-height: 1.15;
height: 32px;
position: relative;
user-select: none;
transition: opacity 0.3s ease;
width: ${_ref3 => {
let {
$width
} = _ref3;
return $width;
}}px;
max-width: 100%;
overflow-x: ${_ref4 => {
let {
$isDisabled
} = _ref4;
return $isDisabled ? 'hidden' : 'scroll';
}};
overflow-y: hidden;
// Chrome
&::-webkit-scrollbar {
display: none;
}
// IE and Edge
-ms-overflow-style: none;
// Firefox
scrollbar-width: none;
`;
export const StyledSliderButtonItem = styled.div`
font-size: 110%;
font-family: 'Roboto Medium', serif;
padding: 7px 12px;
min-width: ${_ref5 => {
let {
$width
} = _ref5;
return $width;
}}px;
max-width: ${_ref6 => {
let {
$width
} = _ref6;
return $width;
}}px;
display: flex;
white-space: nowrap;
justify-content: center;
color: white;
`;
export const StyledSliderButtonPopupContent = styled.div`
display: flex;
flex-direction: column;
`;
export const StyledSliderButtonPopupContentItem = styled.div`
font-size: 110%;
font-family: 'Roboto Medium', serif;
cursor: pointer;
background-color: ${_ref7 => {
let {
$isSelected,
theme
} = _ref7;
return $isSelected ? theme['secondary-102'] : undefined;
}};
padding: 4px 12px;
`;
export const StyledSliderButtonButtonsWrapper = styled.div`
position: absolute;
z-index: ${_ref8 => {
let {
$isInvisible
} = _ref8;
return $isInvisible ? '2' : '4';
}};
opacity: ${_ref9 => {
let {
$isInvisible
} = _ref9;
return $isInvisible ? 0 : 1;
}};
display: flex;
cursor: pointer;
align-items: center;
pointer-events: ${_ref0 => {
let {
$isInvisible
} = _ref0;
return $isInvisible ? 'auto' : 'none';
}};
`;
export const StyledMotionSliderButtonThumb = styled(motion.div)`
font-size: 110%;
font-family: 'Roboto Medium', serif;
background-color: ${_ref1 => {
let {
theme
} = _ref1;
return theme['405'];
}};
opacity: 1;
width: ${_ref10 => {
let {
$width
} = _ref10;
return $width - 8;
}}px;
position: absolute;
border-radius: 2px;
top: 4px;
left: 4px;
white-space: nowrap;
z-index: 3;
height: 24px;
padding: 7px 12px;
display: flex;
color: white;
justify-content: center;
align-items: center;
cursor: pointer;
`;
//# sourceMappingURL=SliderButton.styles.js.map