Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Don't require passing `theme` to `toggleable_icon_button`
Nate Butler33c9f1485215
diff --git a/styles/src/component/icon_button.ts b/styles/src/component/icon_button.tsindex 935909afdbb..dda6be83b20 100644--- a/styles/src/component/icon_button.ts+++ b/styles/src/component/icon_button.ts@@ -77,10 +77,7 @@ export function icon_button({ color, margin, layer, variant, size }: IconButtonO})}-export function toggleable_icon_button(- theme: Theme,- { color, active_color, margin, variant, size, active_layer }: ToggleableIconButtonOptions-) {+export function toggleable_icon_button({ color, active_color, margin, variant, size, active_layer }: ToggleableIconButtonOptions) {if (!color) color = "base"return toggleable({diff --git a/styles/src/style_tree/collab_panel.ts b/styles/src/style_tree/collab_panel.tsindex 07f367c8afe..c4ffee889cb 100644--- a/styles/src/style_tree/collab_panel.ts+++ b/styles/src/style_tree/collab_panel.ts@@ -61,7 +61,7 @@ export default function contacts_panel(): any {width: 14,}- const header_icon_button = toggleable_icon_button(theme, {+ const header_icon_button = toggleable_icon_button({variant: "ghost",size: "sm",active_layer: theme.lowest,diff --git a/styles/src/style_tree/titlebar.ts b/styles/src/style_tree/titlebar.tsindex 0a0b69e5965..0565982eea8 100644--- a/styles/src/style_tree/titlebar.ts+++ b/styles/src/style_tree/titlebar.ts@@ -34,7 +34,7 @@ function call_controls() {}return {- toggle_microphone_button: toggleable_icon_button(theme, {+ toggle_microphone_button: toggleable_icon_button({margin: {...margin_y,left: space.group,@@ -43,7 +43,7 @@ function call_controls() {active_color: "negative",}),- toggle_speakers_button: toggleable_icon_button(theme, {+ toggle_speakers_button: toggleable_icon_button({margin: {...margin_y,left: space.half_item,@@ -51,7 +51,7 @@ function call_controls() {},}),- screen_share_button: toggleable_icon_button(theme, {+ screen_share_button: toggleable_icon_button({margin: {...margin_y,left: space.half_item,@@ -263,7 +263,7 @@ export function titlebar(): any {...call_controls(),- toggle_contacts_button: toggleable_icon_button(theme, {+ toggle_contacts_button: toggleable_icon_button({margin: {left: ITEM_SPACING,},diff --git a/styles/src/style_tree/toolbar.ts b/styles/src/style_tree/toolbar.tsindex 32fd4ab1b58..b3f323eb9e3 100644--- a/styles/src/style_tree/toolbar.ts+++ b/styles/src/style_tree/toolbar.ts@@ -10,7 +10,7 @@ export const toolbar = () => {background: background(theme.highest),border: border(theme.highest, { bottom: true }),item_spacing: 8,- toggleable_tool: toggleable_icon_button(theme, {+ toggleable_tool: toggleable_icon_button({margin: { left: 8 },variant: "ghost",active_color: "accent",diff --git a/styles/src/style_tree/workspace.ts b/styles/src/style_tree/workspace.tsindex 7feccfc8bc5..c24bc3f770d 100644--- a/styles/src/style_tree/workspace.ts+++ b/styles/src/style_tree/workspace.ts@@ -12,7 +12,6 @@ import tabBar from "./tab_bar"import { interactive } from "../element"import { titlebar } from "./titlebar"import { useTheme } from "../theme"-import { toggleable_icon_button } from "../component/icon_button"import { toolbar } from "./toolbar"export default function workspace(): any {