Skip to content

Commit 7a967f6

Browse files
authored
Merge pull request #44 from frailbongat/feature/scrollarea-snippet
feat: add snippet for scroll-area component
2 parents f4c12d0 + 2d85b28 commit 7a967f6

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

src/snippets/imports-code-snippets-next.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,17 @@
283283
],
284284
"description": "https://next.shadcn-svelte.com/docs/components/range-calendar.html"
285285
},
286+
"Scroll Area": {
287+
"prefix": [
288+
"shadcn-ix-scroll-area",
289+
"cni-x-scroll-area"
290+
],
291+
"body": [
292+
"import { ScrollArea } from \"$$lib/components/ui/scroll-area/index.js\"",
293+
""
294+
],
295+
"description": "https://next.shadcn-svelte.com/docs/components/scroll-area.html"
296+
},
286297
"Select": {
287298
"prefix": [
288299
"cni-x-select"

src/snippets/imports-code-snippets.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,17 @@
283283
],
284284
"description": "https://shadcn-svelte.com/docs/components/range-calendar.html"
285285
},
286+
"Scroll Area": {
287+
"prefix": [
288+
"shadcn-i-scroll-area",
289+
"cni-scroll-area"
290+
],
291+
"body": [
292+
"import { ScrollArea } from \"$$lib/components/ui/scroll-area\"",
293+
""
294+
],
295+
"description": "https://shadcn-svelte.com/docs/components/scroll-area.html"
296+
},
286297
"Select": {
287298
"prefix": [
288299
"cni-select"

src/snippets/usage-code-snippets.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,26 @@
576576
],
577577
"description": "https://shadcn-svelte.com/docs/components/range-calendar.html"
578578
},
579+
"Scroll Area": {
580+
"prefix": [
581+
"cnx-scroll-area",
582+
"shadcn-x-scroll-area"
583+
],
584+
"body": [
585+
"<ScrollArea class=\"h-72 w-48 rounded-md border\">",
586+
" <div class=\"p-4\">",
587+
" <h4 class=\"mb-4 text-sm font-medium leading-none\">Tags</h4>",
588+
" {#each Array.from({ length: 50 }) as _, i (i)}",
589+
" <div class=\"text-sm\">",
590+
" v1.2.0-beta.{50 - i}",
591+
" </div>",
592+
" <div class=\"my-2 h-px bg-border\" role=\"separator\"></div>",
593+
" {/each}",
594+
" </div>",
595+
"</ScrollArea>"
596+
],
597+
"description": "https://next.shadcn-svelte.com/docs/components/scroll-area.html"
598+
},
579599
"Select": {
580600
"prefix": [
581601
"cnx-select",

0 commit comments

Comments
 (0)