mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-23 16:30:45 +01:00
fix(components)!: rename select to onSelect on items
This commit is contained in:
@@ -26,7 +26,7 @@ Use the `items` prop as an array of objects with the following properties:
|
||||
- `disabled?: boolean`{lang="ts-type"}
|
||||
- `class?: any`{lang="ts-type"}
|
||||
- [`slot?: string`{lang="ts-type"}](#with-custom-slot)
|
||||
- `select?(e: Event): void`{lang="ts-type"}
|
||||
- `onSelect?(e: Event): void`{lang="ts-type"}
|
||||
|
||||
You can also pass any property from the [Link](/components/link#props) component such as `to`, `target`, etc.
|
||||
|
||||
@@ -306,14 +306,14 @@ const items = [{
|
||||
label: 'Invite by email',
|
||||
icon: 'i-heroicons-paper-airplane',
|
||||
kbds: ['meta', 'e'],
|
||||
select() {
|
||||
onSelect() {
|
||||
console.log('Invite by email clicked')
|
||||
}
|
||||
}, {
|
||||
label: 'Invite by link',
|
||||
icon: 'i-heroicons-link',
|
||||
kbds: ['meta', 'i'],
|
||||
select() {
|
||||
onSelect() {
|
||||
console.log('Invite by link clicked')
|
||||
}
|
||||
}]
|
||||
@@ -321,7 +321,7 @@ const items = [{
|
||||
label: 'New team',
|
||||
icon: 'i-heroicons-plus',
|
||||
kbds: ['meta', 'n'],
|
||||
select() {
|
||||
onSelect() {
|
||||
console.log('New team clicked')
|
||||
}
|
||||
}]
|
||||
|
||||
Reference in New Issue
Block a user