UNPKG

sprinque-js-sdk-wip

Version:

UI kit to implement Pay by Invoice with Sprinque

94 lines (83 loc) 2.12 kB
import { ACTIVE_ITEM_COLOR, BORDER_COLOR, LIGHT_COLOR } from '../styles'; import { SEARCH_TYPE } from '../selectors'; export const STYLE = ` <style> /* step 1 */ #sprinque-businesses { overflow-x: scroll; max-height: 190px; background: ${LIGHT_COLOR}; border: 1px solid ${BORDER_COLOR}; border-radius: 10px; margin: 10px 0; } #sprinque-businesses:empty {display: none} .sprinque-businesses-item { padding: 10px; margin: 5px; } .sprinque-businesses-item:not(:last-child) { border-bottom: 1px solid ${BORDER_COLOR}; } /* checkboxes from https://www.w3schools.com/howto/howto_css_custom_checkbox.asp */ /* Customize the label (the container) */ ${SEARCH_TYPE} { margin-bottom: 5px; } ${SEARCH_TYPE} label { position: relative; padding-left: 25px; margin-right: 20px; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .sdk-lang-de #search-type label { max-width: 140px; word-wrap: break-word; } /* Hide the browser's default checkbox */ ${SEARCH_TYPE} input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; } /* Create a custom checkbox */ .sp-checkmark { position: absolute; top: 7px; left: 0; height: 16px; width: 16px; border: 1px solid ${ACTIVE_ITEM_COLOR}; border-radius: 50%; } /* On mouse-over, add a grey background color */ ${SEARCH_TYPE}:hover input ~ .sp-checkmark { background-color: #ccc; } /* Create the checkmark/indicator (hidden when not checked) */ .sp-checkmark:after { content: ""; position: absolute; display: none; } /* Show the checkmark when checked */ ${SEARCH_TYPE} input:checked ~ .sp-checkmark:after { display: block; } /* Style the checkmark/indicator */ ${SEARCH_TYPE} .sp-checkmark:after { left: 3px; top: 3px; width: 10px; height: 10px; background: ${ACTIVE_ITEM_COLOR}; border-radius: 50%; } </style> `;