mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Port cursor module to plugin
This commit is contained in:
parent
a493ee420d
commit
e16c6e669a
@ -1,3 +1,4 @@
|
||||
import cursor from './plugins/cursor'
|
||||
import display from './plugins/display'
|
||||
import flexbox from './plugins/flexbox'
|
||||
import float from './plugins/float'
|
||||
@ -38,6 +39,7 @@ import zIndex from './plugins/zIndex'
|
||||
|
||||
export default function (config) {
|
||||
return [
|
||||
config.modules.cursor === false ? () => {} : cursor(),
|
||||
config.modules.display === false ? () => {} : display(),
|
||||
config.modules.flexbox === false ? () => {} : flexbox(),
|
||||
config.modules.float === false ? () => {} : float(),
|
||||
|
||||
@ -1,12 +0,0 @@
|
||||
import defineClasses from '../util/defineClasses'
|
||||
|
||||
export default function() {
|
||||
return defineClasses({
|
||||
'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' },
|
||||
})
|
||||
}
|
||||
12
src/plugins/cursor.js
Normal file
12
src/plugins/cursor.js
Normal file
@ -0,0 +1,12 @@
|
||||
export default function () {
|
||||
return function ({ addUtilities, config }) {
|
||||
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' },
|
||||
}, config('modules.cursor'))
|
||||
}
|
||||
}
|
||||
@ -10,7 +10,6 @@ import borderColors from './generators/borderColors'
|
||||
import borderRadius from './generators/borderRadius'
|
||||
import borderStyle from './generators/borderStyle'
|
||||
import borderWidths from './generators/borderWidths'
|
||||
import cursor from './generators/cursor'
|
||||
|
||||
export default [
|
||||
{ name: 'lists', generator: lists },
|
||||
@ -25,5 +24,4 @@ export default [
|
||||
{ name: 'borderRadius', generator: borderRadius },
|
||||
{ name: 'borderStyle', generator: borderStyle },
|
||||
{ name: 'borderWidths', generator: borderWidths },
|
||||
{ name: 'cursor', generator: cursor },
|
||||
]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user