Skip to content

Instantly share code, notes, and snippets.

View cn-2k's full-sized avatar
🎯
Focusing

cn-2k cn-2k

🎯
Focusing
View GitHub Profile
@JeffreyWay
JeffreyWay / Modal.vue
Last active October 14, 2023 19:44
Learn Vue 3: Step By Step, Episode 28 - Build a Modal Component - https://laracasts.com/series/learn-vue-3-step-by-step/episodes/28
<script setup>
defineProps({
show: Boolean
});
</script>
<template>
<div v-if="show" class="modal-mask">
<div class="modal-container">
<div>
import { unrefElement, useEventListener } from '@vueuse/core'
const defaultWindow = typeof window !== 'undefined' ? window : undefined
/**
* Listen for clicks outside of an element.
*
* @see https://vueuse.org/onClickOutside
* @param target
* @param handler
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active June 8, 2024 13:20
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example