2019-01-09 13:14:31 -05:00
|
|
|
import _ from 'lodash'
|
2019-04-02 15:55:19 -05:00
|
|
|
import flattenColorPalette from '../util/flattenColorPalette'
|
2019-01-09 13:14:31 -05:00
|
|
|
|
2019-02-28 12:33:59 -05:00
|
|
|
export default function() {
|
2019-04-18 23:29:07 +02:00
|
|
|
return function({ addUtilities, e, theme, variants }) {
|
2020-05-07 00:22:07 +10:00
|
|
|
const colors = flattenColorPalette(theme('stroke'))
|
|
|
|
|
|
2019-01-11 12:29:33 -05:00
|
|
|
const utilities = _.fromPairs(
|
2020-05-07 00:22:07 +10:00
|
|
|
_.map(colors, (value, modifier) => {
|
2020-05-07 00:28:45 +10:00
|
|
|
return [`.${e(`stroke-${modifier}`)}`, { stroke: value }]
|
2019-01-11 12:29:33 -05:00
|
|
|
})
|
|
|
|
|
)
|
2019-01-09 13:14:31 -05:00
|
|
|
|
2019-04-18 09:42:21 -04:00
|
|
|
addUtilities(utilities, variants('stroke'))
|
2019-01-09 13:14:31 -05:00
|
|
|
}
|
|
|
|
|
}
|