improve styling

This commit is contained in:
Philipp Kühn 2021-01-18 16:54:02 +01:00 committed by Hans Pagel
parent bb71cf597e
commit a7ac9a7ef4
3 changed files with 16 additions and 8 deletions

View File

@ -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>

View File

@ -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

View File

@ -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.