-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
67 additions
and
227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
import { styles } from '@/registry/registry-styles' | ||
--- | ||
|
||
<select | ||
x-model="$store.style" | ||
class="flex items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>option]:line-clamp-1 h-7 w-[145px] text-xs" | ||
> | ||
{styles.map((style) => <option value={style.name}>{style.label}</option>)} | ||
</select> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<script> | ||
import Alpine from 'alpinejs' | ||
|
||
Alpine.store('style', 'new-york') | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 7 additions & 12 deletions
19
docs/src/components/component-preview/ComponentSource.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,9 @@ | ||
--- | ||
import { styles } from '@/registry/registry-styles' | ||
import { Select, SelectContent, syncKey } from './select' | ||
--- | ||
|
||
<Select syncKey={syncKey} hideSelect={true}> | ||
<SelectContent label={styles[0].label} value={styles[0].name}> | ||
<div x-data> | ||
<template x-if="$store.style === 'new-york'"> | ||
<slot name="new-york"><p>Not found</p></slot> | ||
</SelectContent> | ||
<SelectContent label={styles[1].label} value={styles[1].name}> | ||
</template> | ||
|
||
<template x-if="$store.style === 'default'"> | ||
<slot name="default"> <p>Not found</p></slot> | ||
</SelectContent> | ||
</Select> | ||
</template> | ||
</div> |
This file was deleted.
Oops, something went wrong.
153 changes: 0 additions & 153 deletions
153
docs/src/components/component-preview/select/Select.astro
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
docs/src/components/component-preview/select/SelectContent.astro
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters