Sha256: 93061c1af488b3ea6bc4d69e3696fdc3b056ce35ba0d3f558c58cbb0200b5c28
Contents?: true
Size: 472 Bytes
Versions: 12
Compression:
Stored size: 472 Bytes
Contents
import config from "../config"; export default function createSidebarStore(Alpine) { const { defaultWidth, minWidth, maxWidth } = config.sidebar; return { open: Alpine.$persist(true).as("sidebar-open"), width: Alpine.$persist(defaultWidth).as("sidebar-width"), panelSplits: Alpine.$persist([1.0, 1.0]).as(`sidebar-panel-splits`), minWidth, maxWidth, toggle() { Alpine.store("sidebar").open = !Alpine.store("sidebar").open; }, }; }
Version data entries
12 entries across 12 versions & 1 rubygems