mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-01-18 06:03:22 +08:00
improve styling
This commit is contained in:
parent
bb71cf597e
commit
a7ac9a7ef4
@ -74,14 +74,23 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
.items {
|
||||
position: relative;
|
||||
border-radius: 0.25rem;
|
||||
background: white;
|
||||
color: rgba(black, 0.8);
|
||||
overflow: hidden;
|
||||
font-size: 0.9rem;
|
||||
box-shadow:
|
||||
0 0 0 1px rgba(0, 0, 0, 0.1),
|
||||
0px 10px 20px rgba(0, 0, 0, 0.1),
|
||||
;
|
||||
}
|
||||
.item {
|
||||
background: white;
|
||||
color: black;
|
||||
padding: 0.5rem;
|
||||
padding: 0.2rem 0.5rem;
|
||||
|
||||
&.is-selected {
|
||||
background: #ccc;
|
||||
&.is-selected,
|
||||
&:hover {
|
||||
color: black;
|
||||
background: rgba(black, 0.1);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -32,7 +32,7 @@ export default {
|
||||
Text,
|
||||
Mention.configure({
|
||||
items: query => {
|
||||
return ['foo', 'bar'].filter(item => item.startsWith(query))
|
||||
return ['Hans', 'Philipp', 'Kris'].filter(item => item.startsWith(query))
|
||||
},
|
||||
renderer: () => {
|
||||
let component
|
||||
|
@ -178,8 +178,7 @@ export function Suggestion({
|
||||
return false
|
||||
}
|
||||
|
||||
// return onKeyDown({ view, event, range })
|
||||
return testRenderer?.onKeyDown?.({ view, event, range })
|
||||
return testRenderer?.onKeyDown?.({ view, event, range }) || false
|
||||
},
|
||||
|
||||
// Setup decorator on the currently active suggestion.
|
||||
|
Loading…
Reference in New Issue
Block a user