Use theme store to pass color_scheme
directly to components
This commit is contained in:
parent
f8316dd127
commit
d5acfe8fc1
36 changed files with 280 additions and 136 deletions
|
@ -1,5 +1,5 @@
|
|||
import { with_opacity } from "../theme/color"
|
||||
import { ColorScheme, Layer, StyleSets } from "../theme/color_scheme"
|
||||
import { Layer, StyleSets } from "../theme/color_scheme"
|
||||
import {
|
||||
background,
|
||||
border,
|
||||
|
@ -11,8 +11,11 @@ import hover_popover from "./hover_popover"
|
|||
|
||||
import { build_syntax } from "../theme/syntax"
|
||||
import { interactive, toggleable } from "../element"
|
||||
import { useTheme } from "../theme"
|
||||
|
||||
export default function editor(): any {
|
||||
const theme = useTheme()
|
||||
|
||||
export default function editor(theme: ColorScheme): any {
|
||||
const { is_light } = theme
|
||||
|
||||
const layer = theme.highest
|
||||
|
@ -248,7 +251,7 @@ export default function editor(theme: ColorScheme): any {
|
|||
invalid_hint_diagnostic: diagnostic(theme.middle, "base"),
|
||||
invalid_information_diagnostic: diagnostic(theme.middle, "base"),
|
||||
invalid_warning_diagnostic: diagnostic(theme.middle, "base"),
|
||||
hover_popover: hover_popover(theme),
|
||||
hover_popover: hover_popover(),
|
||||
link_definition: {
|
||||
color: syntax.link_uri.color,
|
||||
underline: syntax.link_uri.underline,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue