Skip to content

Instantly share code, notes, and snippets.

@dillonchanis
dillonchanis / tailwind.config.js
Created January 31, 2024 01:46
UntitledUI Color Palette for Tailwind
/** @type {import('tailwindcss').Config} */
export default {
theme: {
extend: {
colors: {
gray: {
25: "#FCFCFD",
50: "#F9FAFB",
100: "#F2F4F7",
200: "#EAECF0",
@dillonchanis
dillonchanis / example.css
Created September 20, 2020 14:44
Tailwind Utility for using gradients with text
@layer utilities {
.text-gradient {
background-clip: text;
-webkit-text-fill-color: transparent;
}
}
@dillonchanis
dillonchanis / ErrorBoundary.js
Created April 22, 2018 19:24
Simple Error Boundary
export default {
name: 'ErrorBoundary',
data: () => ({
error: false
}),
errorCaptured (err, vm, info) {
this.error = true
},
render (h) {
return this.error ? h('p', 'Something went wrong') : this.$slots.default[0]
@dillonchanis
dillonchanis / App.vue
Created April 8, 2018 21:55
Idea for a media query component...how would I want this to work
<template>
<div>
<!-- Show acts as if you are setting display: block, flex, etc. -->
<media-query max-width at="768" show>
Hello World
</media-query>
<!-- Hide acts if you are setting display: hidden -->
<media-query max-width at="992" hide>
Hidden at 992 and above
@dillonchanis
dillonchanis / deepfilter.js
Last active March 7, 2018 18:50
Deepfilter
function deepFilter (search, arr) {
if (!search) return arr
const result = []
arr.forEach(element => {
let temp = []
let found = false
Object.keys(element).forEach(k => {
@dillonchanis
dillonchanis / HackerNews.elm
Created July 25, 2017 10:58
Elm HN Client
module HackerNews exposing (..)
import Html exposing (..)
import Html.Attributes exposing (..)
import Http
import Json.Decode as Decode exposing (Decoder, field)
-- MODELS