forked from brianvoe/slim-select
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into select-options-by-id
- Loading branch information
Showing
27 changed files
with
3,331 additions
and
497 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,27 @@ | ||
name: 'Jest unit tests' | ||
on: | ||
push: | ||
paths-ignore: | ||
- '**/dist/**' | ||
- '**/*.md' | ||
- '.github/**' | ||
- '.vscode/**' | ||
pull_request: | ||
branches: | ||
- develop | ||
paths-ignore: | ||
- '**/dist/**' | ||
- '**/*.md' | ||
- '.github/**' | ||
- '.vscode/**' | ||
jobs: | ||
jest: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '21.5.0' | ||
cache: 'npm' | ||
- run: npm ci | ||
- run: npm run test |
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 @@ | ||
**/dist |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
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
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
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
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
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,81 @@ | ||
<script lang="ts"> | ||
import { defineComponent } from 'vue' | ||
import SlimSelect from '../../../slim-select' | ||
export default defineComponent({ | ||
name: 'CustomCss', | ||
mounted() { | ||
new SlimSelect({ select: this.$refs.mainSelect as HTMLSelectElement, cssClasses: { option: 'primary-option' } }) | ||
new SlimSelect({ select: this.$refs.secondarySelect as HTMLSelectElement, cssClasses: { option: 'secondary-option' } }) | ||
}, | ||
}) | ||
</script> | ||
|
||
<style lang="scss"> | ||
.primary-option, .secondary-option { | ||
padding: 0.25rem 0.5rem; | ||
cursor: pointer; | ||
} | ||
.primary-option { | ||
color: var(--ss-bg-color); | ||
background: var(--ss-primary-color); | ||
&:hover { | ||
color: var(--ss-primary-color); | ||
background: var(--ss-bg-color); | ||
} | ||
} | ||
.secondary-option { | ||
color: var(--ss-primary-color); | ||
background: var(--ss-bg-color); | ||
&:hover { | ||
color: var(--ss-bg-color); | ||
background: var(--ss-primary-color); | ||
} | ||
} | ||
</style> | ||
|
||
<template> | ||
<div id="cssClasses" class="content"> | ||
<h2 class="header">cssClasses</h2> | ||
<p> | ||
You can override the default CSS classes by setting them during initialization. | ||
</p> | ||
|
||
<div class="row"> | ||
<select ref="mainSelect"> | ||
<option value="value1">Value 1</option> | ||
<option value="value2">Value 2</option> | ||
<option value="value3">Value 3</option> | ||
</select> | ||
<select ref="secondarySelect"> | ||
<option value="value1">Value 1</option> | ||
<option value="value2">Value 2</option> | ||
<option value="value3">Value 3</option> | ||
</select> | ||
</div> | ||
|
||
<pre> | ||
<code class="language-html"> | ||
<select id="primary-select"> | ||
<option value="value1">Value 1</option> | ||
<option value="value2">Value 2</option> | ||
<option value="value3">Value 3</option> | ||
</select> | ||
</code> | ||
</pre> | ||
|
||
<pre> | ||
<code class="language-javascript"> | ||
new SlimSelect({ | ||
select: '#primary-select', | ||
cssClasses: { | ||
option: "primary-option" | ||
}) | ||
</code> | ||
</pre> | ||
</div> | ||
</template> |
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
Oops, something went wrong.