Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
let buttonsLocationCss = "";
switch (buttonsLocation) {
case CarouselButtonsLocation.top:
buttonsLocationCss = styles.blockButtonsContainer;
break;
case CarouselButtonsLocation.center:
buttonsLocationCss = styles.centralButtonsContainer;
break;
case CarouselButtonsLocation.bottom:
buttonsLocationCss = styles.bottomButtonsContainer;
break;
default:
return "";
}
const result = css(buttonDisplayModeCss, buttonsLocationCss);
return result;
}
private getButtonStyles(nextButton: boolean) {
const buttonsDisplayMode = this.props.buttonsDisplay ? this.props.buttonsDisplay : CarouselButtonsDisplay.block;
let result = "";
if (buttonsDisplayMode === CarouselButtonsDisplay.buttonsOnly) {
result = nextButton ? styles.buttonsOnlyNextButton : styles.buttonsOnlyPrevButton;
}
return css(result);
}
private getMergedStyles = (componentStyles: string, userStyles?: ICssInput): string => {
const mergedStyles = userStyles ? css(componentStyles, userStyles) : css(componentStyles);
return mergedStyles;
}