Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Secretly deleting database 👿

CJ Ronxel ronssij

🏠
Secretly deleting database 👿
View GitHub Profile
@ronssij
ronssij / icon.vue
Created May 20, 2022
Functional vue icon component
View icon.vue
<script>
import { has, map } from 'lodash'
export default {
name: 'AftIcon',
functional: true,
props: {
tag: {
@ronssij
ronssij / icon-colors.js
Last active May 20, 2022
Extending Tailwind CSS color palattes to create custom prefxied colors.
View icon-colors.js
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') {