Don't require passing theme to toggleable_icon_button

This commit is contained in:
Nate Butler 2023-08-29 16:01:08 -04:00
parent 0a14e33dba
commit 33c9f14852
5 changed files with 7 additions and 11 deletions

View File

@ -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({

View File

@ -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,

View File

@ -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,
},

View File

@ -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",

View File

@ -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 {