Merge branch 'hacknug-feature/cursors' into next

This commit is contained in:
Adam Wathan 2019-02-22 12:47:34 -05:00
commit 4c1bf08093
2 changed files with 23 additions and 12 deletions

View File

@ -210,6 +210,14 @@ module.exports = function() {
lg: '.5rem',
full: '9999px',
},
cursor: {
auto: 'auto',
default: 'default',
pointer: 'pointer',
wait: 'wait',
move: 'move',
'not-allowed': 'not-allowed',
},
width: theme => ({
auto: 'auto',
...theme.spacing,

View File

@ -1,15 +1,18 @@
export default function({ variants }) {
return function({ addUtilities }) {
addUtilities(
{
'.cursor-auto': { cursor: 'auto' },
'.cursor-default': { cursor: 'default' },
'.cursor-pointer': { cursor: 'pointer' },
'.cursor-wait': { cursor: 'wait' },
'.cursor-move': { cursor: 'move' },
'.cursor-not-allowed': { cursor: 'not-allowed' },
},
variants
import _ from 'lodash'
export default function({ values, variants }) {
return function({ addUtilities, e }) {
const utilities = _.fromPairs(
_.map(values, (value, modifier) => {
return [
`.${e(`cursor-${modifier}`)}`,
{
cursor: value,
},
]
})
)
addUtilities(utilities, variants)
}
}