Skip to content

Instantly share code, notes, and snippets.

@plmrlnsnts
plmrlnsnts / settings.jsonc
Last active February 11, 2022 00:29
Code Settings
{
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
@plmrlnsnts
plmrlnsnts / vue-dropdown.md
Last active December 23, 2020 17:33
Headless dropdown component for Vue.js

Usage

<dropdown-menu v-slot="{ open, close }">
    <dropdown-toggle @click="open">
        Dropdown
    </dropdown-toggle>
    <dropdown-menu>
        <a href="#item-1" @click="close">Item 1</a>
        <a href="#item-2" @click="close">Item 2</a>
@plmrlnsnts
plmrlnsnts / vue-datatable.md
Last active May 15, 2023 18:12
Datatable component for Vue and Tailwind CSS

Keep in mind that this implementation requires an api for fetching data, and assumes the following response schema:

{
    "perPageOptions": [
        15, 50, 100
    ],
    "actions": [
        "Delete all", "Publish All", "Unpublish All"
    ],