2019-12-24 20:14:00 -05:00
|
|
|
import createUtilityPlugin from '../util/createUtilityPlugin'
|
2020-08-06 16:27:35 -04:00
|
|
|
import { flagEnabled } from '../featureFlags'
|
2019-12-24 20:14:00 -05:00
|
|
|
|
2020-10-16 13:30:06 -04:00
|
|
|
export default function () {
|
|
|
|
|
return function ({ config, ...args }) {
|
2020-08-06 16:27:35 -04:00
|
|
|
if (flagEnabled(config(), 'removeDeprecatedGapUtilities')) {
|
|
|
|
|
createUtilityPlugin('gap', [
|
|
|
|
|
['gap', ['gridGap', 'gap']],
|
|
|
|
|
['gap-x', ['gridColumnGap', 'columnGap']],
|
|
|
|
|
['gap-y', ['gridRowGap', 'rowGap']],
|
2020-10-15 12:29:50 -04:00
|
|
|
])({ config, ...args })
|
2020-08-06 16:27:35 -04:00
|
|
|
} else {
|
|
|
|
|
createUtilityPlugin('gap', [
|
|
|
|
|
['gap', ['gridGap', 'gap']],
|
|
|
|
|
['col-gap', ['gridColumnGap', 'columnGap']],
|
|
|
|
|
['gap-x', ['gridColumnGap', 'columnGap']],
|
|
|
|
|
['row-gap', ['gridRowGap', 'rowGap']],
|
|
|
|
|
['gap-y', ['gridRowGap', 'rowGap']],
|
2020-10-15 12:29:50 -04:00
|
|
|
])({ config, ...args })
|
2020-08-06 16:27:35 -04:00
|
|
|
}
|
2020-04-26 15:10:12 -04:00
|
|
|
}
|
2019-12-24 20:14:00 -05:00
|
|
|
}
|