Skip to content

Instantly share code, notes, and snippets.

View ronssij's full-sized avatar
🏠
Secretly deleting database 👿

CJ Ronxel ronssij

🏠
Secretly deleting database 👿
View GitHub Profile
@ronssij
ronssij / icon.vue
Created May 20, 2022 20:54
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 20:52
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') {