-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(sort-mixin): get rid of SortMixin and refactor components wh…
…ich use it (#1448) BREAKING CHANGE: base-dropdown component will no longer emit the `change` event, use `update:modelValue` instead. base-dropdown prop for the selected item was renamed from `value` to `modelValue`.
- Loading branch information
1 parent
a63eccc
commit de0a287
Showing
27 changed files
with
749 additions
and
1,059 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
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 +1,2 @@ | ||
export * from './animations'; | ||
export { default as TestBaseDropdown } from './test-base-dropdown.vue'; |
22 changes: 22 additions & 0 deletions
22
packages/_vue3-migration-test/src/components/test-base-dropdown.vue
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,22 @@ | ||
<template> | ||
<BaseDropdown v-model="value" :items="items"> | ||
<template #toggle="{ item, isOpen }">{{ item }} {{ isOpen ? '🔼' : '🔽' }}️</template> | ||
<template #item="{ item, isSelected, isHighlighted }"> | ||
<span v-if="isHighlighted">🟢</span> | ||
<span v-if="isSelected">✅</span> | ||
<span>{{ item }}</span> | ||
</template> | ||
</BaseDropdown> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { Identifiable } from '@empathyco/x-types'; | ||
import { ref } from 'vue'; | ||
import BaseDropdown from '../../../x-components/src/components/base-dropdown.vue'; | ||
type BaseDropdownItem = string | number | Identifiable; | ||
const items: Array<BaseDropdownItem> = ['a', 2, { id: '3' }]; | ||
const value = ref<BaseDropdownItem>(items[0]); | ||
</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
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
Oops, something went wrong.