Skip to content

Commit

Permalink
Expose syntax_style (#261)
Browse files Browse the repository at this point in the history
* allow syntax_style field and add icon to examples/tests

* bump

Co-authored-by: Nathan Clack <nclack@chanzuckerberg.com>
  • Loading branch information
brisvag and nclack authored Dec 16, 2022
1 parent 0db5c3e commit 367b31f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions _docs/example_manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ contributions:
- label: "Monokai"
id: "monokai"
type: "dark"
syntax_style: "monokai"
colors:
canvas: "#000000"
console: "#000000"
Expand All @@ -51,6 +52,7 @@ contributions:
secondary: "#f8f8f2"
highlight: "#e6db74"
text: "#a1ef34"
icon: "#a1ef34"
warning: "#f92672"
current: "#66d9ef"
sample_data:
Expand Down
1 change: 1 addition & 0 deletions npe2/manifest/contributions/_themes.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class ThemeContribution(BaseModel):
description="Base theme type, used for icons and filling in unprovided colors. "
"Must be either `'dark'` or `'light'`."
)
syntax_style: Optional[str]
colors: ThemeColors = Field(
description=f"Theme colors. Valid keys include: {_color_keys}. All keys "
"are optional. Color values can be defined via:\n"
Expand Down
2 changes: 2 additions & 0 deletions tests/sample/my_plugin/napari.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ contributions:
- label: "SampleTheme"
id: "sample_theme"
type: "dark"
syntax_style: "default"
colors:
canvas: "#000000"
console: "#000000"
Expand All @@ -84,6 +85,7 @@ contributions:
secondary: "#f8f8f2"
highlight: "#e6db74"
text: "#a1ef34"
icon: "#a1ef34"
warning: "#f92672"
current: "#66d9ef"
sample_data:
Expand Down

0 comments on commit 367b31f

Please sign in to comment.