@hperchec/scorpion-ui-template-default
Version:
Scorpion UI - Default template
175 lines (173 loc) • 4.77 kB
JavaScript
// 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
:text-white
:bg--primary
:hover:bg--primary-400
:hover:text-white
:focus:bg--primary-400
:focus:text-white
:text--text-primary
:bg--primary
:hover:bg--primary-400
:hover:text--text-primary
:focus:bg--primary-400
:focus:text--text-primary
`,
dropdown: `
w-full
flex flex-col
rounded
shadow
overflow-hidden
:bg--primary
:bg--primary
`
},
/**
* 'light' theme variants
*/
alabaster: {
button: `
w-full
block
px-4 py-1
rounded
bg--alabaster
text-gray-500
transition duration-200 ease-in-out
hover:bg--primary
hover:text--text-primary
hover:shadow
focus:bg--primary
focus:text--text-primary
focus:shadow
`,
dropdown: `
w-full
flex flex-col
rounded
bg--alabaster
shadow
overflow-hidden
`
},
'white-smoke': {
button: `
w-full
block
px-4 py-1
rounded
bg--white-smoke
text-gray-500
transition duration-200 ease-in-out
hover:bg--primary
hover:text--text-primary
hover:shadow
focus:bg--primary
focus:text--text-primary
focus:shadow
`,
dropdown: `
w-full
flex flex-col
rounded
bg--white-smoke
shadow
overflow-hidden
`
},
/**
* 'dark' theme variants
*/
tuna: {
button: `
w-full
block
px-4 py-1
rounded
bg--tuna
text-gray-500
transition duration-200 ease-in-out
hover:bg--primary
hover:text--text-primary
hover:shadow
focus:bg--primary
focus:text--text-primary
focus:shadow
`,
dropdown: `
w-full
flex flex-col
rounded
bg--tuna
shadow
overflow-hidden
`
},
'dark-jungle': {
button: `
w-full
block
px-4 py-1
rounded
bg--dark-jungle
text-gray-500
transition duration-200 ease-in-out
hover:bg--primary
hover:text--text-primary
hover:shadow
focus:bg--primary
focus:text--text-primary
focus:shadow
`,
dropdown: `
w-full
flex flex-col
rounded
bg--dark-jungle
shadow
overflow-hidden
`
}
}
}
}