Skip to content

Commit

Permalink
Names are hard
Browse files Browse the repository at this point in the history
  • Loading branch information
mgmeyers committed Aug 6, 2021
1 parent ac68e68 commit 2d2390b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ settings:
*/
```

## `class-multi-toggle`
## `class-select`

`class-multi-toggle` creates a dropdown of predefined options for a CSS variable. The `id` of the setting will be used as the variable name.
`class-select` creates a dropdown of predefined options for a CSS variable. The `id` of the setting will be used as the variable name.

- When `allowEmpty` is `false`, a `default` option **must** be specified.
- When `allowEmpty` is `true`, the `default` attribute is optional, and may be set to `none`.
Expand All @@ -111,7 +111,7 @@ settings:
id: theme-variant
title: Theme variant
description: Variations on a theme
type: class-multi-toggle
type: class-select
allowEmpty: false
default: my-class
options:
Expand All @@ -134,7 +134,7 @@ settings:
id: theme-variant
title: Theme variant
description: Variations on a theme
type: class-multi-toggle
type: class-select
allowEmpty: false
default: my-class
options:
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "obsidian-style-settings",
"name": "Style Settings",
"version": "0.3.0",
"version": "0.3.1",
"minAppVersion": "0.11.5",
"description": "Offers controls for adjusting theme, plugin, and snippet CSS variables.",
"author": "mgmeyers",
Expand Down
2 changes: 1 addition & 1 deletion src/SettingsManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ export class CSSSettingsManager {
if (this.getSetting(section, settingId)) {
document.body.classList.add(setting.id);
}
} else if (setting.type === "class-multi-toggle") {
} else if (setting.type === "class-select") {
const multiToggle = setting as ClassMultiToggle;
let value = this.getSetting(section, settingId) as string | undefined;

Expand Down
2 changes: 1 addition & 1 deletion src/settingHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@ export function createSettings(opts: {
});
break;
}
case "class-multi-toggle": {
case "class-select": {
pushId(setting.id);
createClassMultiToggle({
sectionId,
Expand Down

0 comments on commit 2d2390b

Please sign in to comment.