improve styling

This commit is contained in:
Philipp Kühn
2021-01-18 16:54:02 +01:00
parent 7adc8b24a0
commit dd3a2ce490
3 changed files with 16 additions and 8 deletions

View File

@@ -74,14 +74,23 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.items { .items {
position: relative; 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 { .item {
background: white; padding: 0.2rem 0.5rem;
color: black;
padding: 0.5rem;
&.is-selected { &.is-selected,
background: #ccc; &:hover {
color: black;
background: rgba(black, 0.1);
} }
} }
</style> </style>

View File

@@ -32,7 +32,7 @@ export default {
Text, Text,
Mention.configure({ Mention.configure({
items: query => { items: query => {
return ['foo', 'bar'].filter(item => item.startsWith(query)) return ['Hans', 'Philipp', 'Kris'].filter(item => item.startsWith(query))
}, },
renderer: () => { renderer: () => {
let component let component

View File

@@ -178,8 +178,7 @@ export function Suggestion({
return false return false
} }
// return onKeyDown({ view, event, range }) return testRenderer?.onKeyDown?.({ view, event, range }) || false
return testRenderer?.onKeyDown?.({ view, event, range })
}, },
// Setup decorator on the currently active suggestion. // Setup decorator on the currently active suggestion.