View icon.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
import { has, map } from 'lodash' | |
export default { | |
name: 'AftIcon', | |
functional: true, | |
props: { | |
tag: { |
View icon-colors.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const plugin = require('tailwindcss/plugin') | |
/** | |
* Utlizes tailwind colors config and icon-{color} class is created, analog to bg- and text- classes. | |
* | |
* eg. class="icon-white" | |
*/ | |
const generateColors = (e, colors, prefix) => | |
Object.keys(colors).reduce((acc, key) => { | |
if (typeof colors[key] === 'string') { |