UNPKG

@hperchec/scorpion-ui-template-default

Version:
175 lines (173 loc) 4.77 kB
// Vue-tailwind component import { TDropdown } from 'vue-tailwind/dist/components' export default { component: TDropdown, props: { fixedClasses: { // button: 'flex items-center text-gray-200 block px-4 py-2 transition duration-100 ease-in-out border border-transparent shadow-sm focus:border-blue-500 focus:ring-2 focus:ring-blue-500 focus:outline-none focus:ring-opacity-50 disabled:opacity-50 disabled:cursor-not-allowed', button: ` focus:border-none focus:ring-none focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed `, wrapper: ` relative inline-flex flex-col `, dropdownWrapper: 'relative -top-1', dropdown: 'origin-top-left absolute top-0 w-auto mt-1 z-10', enterClass: 'opacity-0 scale-95', enterActiveClass: 'transition transform ease-in-out duration-100', enterToClass: 'opacity-100 scale-100', leaveClass: 'opacity-100 scale-100', leaveActiveClass: 'transition transform ease-in-out duration-100', leaveToClass: 'opacity-0 scale-95' }, classes: { button: 'hover:bg-@light-tertiary', dropdown: 'bg-transparent shadow-none' }, variants: { /** * Common variants */ primary: { button: ` w-full block px-4 py-1 rounded transition duration-200 ease-in-out hover:shadow focus:shadow @light:text-white @light:bg-@light-primary @light:hover:bg-@light-primary-400 @light:hover:text-white @light:focus:bg-@light-primary-400 @light:focus:text-white @dark:text-@dark-text-primary @dark:bg-@dark-primary @dark:hover:bg-@dark-primary-400 @dark:hover:text-@dark-text-primary @dark:focus:bg-@dark-primary-400 @dark:focus:text-@dark-text-primary `, dropdown: ` w-full flex flex-col rounded shadow overflow-hidden @dark:bg-@dark-primary @light:bg-@light-primary ` }, /** * 'light' theme variants */ alabaster: { button: ` w-full block px-4 py-1 rounded bg-@light-alabaster text-gray-500 transition duration-200 ease-in-out hover:bg-@light-primary hover:text-@light-text-primary hover:shadow focus:bg-@light-primary focus:text-@light-text-primary focus:shadow `, dropdown: ` w-full flex flex-col rounded bg-@light-alabaster shadow overflow-hidden ` }, 'white-smoke': { button: ` w-full block px-4 py-1 rounded bg-@light-white-smoke text-gray-500 transition duration-200 ease-in-out hover:bg-@light-primary hover:text-@light-text-primary hover:shadow focus:bg-@light-primary focus:text-@light-text-primary focus:shadow `, dropdown: ` w-full flex flex-col rounded bg-@light-white-smoke shadow overflow-hidden ` }, /** * 'dark' theme variants */ tuna: { button: ` w-full block px-4 py-1 rounded bg-@dark-tuna text-gray-500 transition duration-200 ease-in-out hover:bg-@dark-primary hover:text-@dark-text-primary hover:shadow focus:bg-@dark-primary focus:text-@dark-text-primary focus:shadow `, dropdown: ` w-full flex flex-col rounded bg-@dark-tuna shadow overflow-hidden ` }, 'dark-jungle': { button: ` w-full block px-4 py-1 rounded bg-@dark-dark-jungle text-gray-500 transition duration-200 ease-in-out hover:bg-@dark-primary hover:text-@dark-text-primary hover:shadow focus:bg-@dark-primary focus:text-@dark-text-primary focus:shadow `, dropdown: ` w-full flex flex-col rounded bg-@dark-dark-jungle shadow overflow-hidden ` } } } }