Tune styles and disclosable elements
This commit is contained in:
@@ -44,10 +44,10 @@ export function icon_button({ color, margin, layer, variant, size }: IconButtonO
|
||||
}
|
||||
|
||||
const padding = {
|
||||
top: size === Button.size.Small ? 0 : 2,
|
||||
bottom: size === Button.size.Small ? 0 : 2,
|
||||
left: size === Button.size.Small ? 0 : 4,
|
||||
right: size === Button.size.Small ? 0 : 4,
|
||||
top: size === Button.size.Small ? 2 : 2,
|
||||
bottom: size === Button.size.Small ? 2 : 2,
|
||||
left: size === Button.size.Small ? 2 : 4,
|
||||
right: size === Button.size.Small ? 2 : 4,
|
||||
}
|
||||
|
||||
return interactive({
|
||||
@@ -55,10 +55,10 @@ export function icon_button({ color, margin, layer, variant, size }: IconButtonO
|
||||
corner_radius: 6,
|
||||
padding: padding,
|
||||
margin: m,
|
||||
icon_width: 14,
|
||||
icon_width: 12,
|
||||
icon_height: 14,
|
||||
button_width: 20,
|
||||
button_height: 16,
|
||||
button_width: size === Button.size.Small ? 16 : 20,
|
||||
button_height: 14,
|
||||
},
|
||||
state: {
|
||||
default: {
|
||||
|
||||
@@ -14,6 +14,7 @@ import { indicator } from "../component/indicator"
|
||||
export default function contacts_panel(): any {
|
||||
const theme = useTheme()
|
||||
|
||||
const CHANNEL_SPACING = 4 as const
|
||||
const NAME_MARGIN = 6 as const
|
||||
const SPACING = 12 as const
|
||||
const INDENT_SIZE = 8 as const
|
||||
@@ -153,8 +154,8 @@ export default function contacts_panel(): any {
|
||||
return {
|
||||
...collab_modals(),
|
||||
disclosure: {
|
||||
button: toggleable_icon_button(theme, {}),
|
||||
spacing: 4,
|
||||
button: icon_button({ variant: "ghost", size: "sm" }),
|
||||
spacing: CHANNEL_SPACING,
|
||||
},
|
||||
log_in_button: interactive({
|
||||
base: {
|
||||
@@ -198,7 +199,7 @@ export default function contacts_panel(): any {
|
||||
add_channel_button: header_icon_button,
|
||||
leave_call_button: header_icon_button,
|
||||
row_height: ITEM_HEIGHT,
|
||||
channel_indent: INDENT_SIZE * 2,
|
||||
channel_indent: INDENT_SIZE * 2 + 2,
|
||||
section_icon_size: 14,
|
||||
header_row: {
|
||||
...text(layer, "sans", { size: "sm", weight: "bold" }),
|
||||
@@ -268,7 +269,7 @@ export default function contacts_panel(): any {
|
||||
channel_name: {
|
||||
...text(layer, "sans", { size: "sm" }),
|
||||
margin: {
|
||||
left: NAME_MARGIN,
|
||||
left: CHANNEL_SPACING,
|
||||
},
|
||||
},
|
||||
list_empty_label_container: {
|
||||
|
||||
@@ -1,18 +1,26 @@
|
||||
import { toggle_label_button_style } from "../component/label_button"
|
||||
|
||||
import { useTheme } from "../common"
|
||||
import { text_button } from "../component/text_button"
|
||||
import { toggleable_icon_button } from "../component/icon_button"
|
||||
import { icon_button } from "../component/icon_button"
|
||||
import { text } from "./components"
|
||||
import { toggleable } from "../element"
|
||||
|
||||
export default function contacts_panel(): any {
|
||||
const theme = useTheme()
|
||||
|
||||
return {
|
||||
button: text_button({}),
|
||||
toggle: toggle_label_button_style({ active_color: "accent" }),
|
||||
toggle: toggleable({
|
||||
base: text_button({}),
|
||||
state: {
|
||||
active: {
|
||||
...text_button({ color: "accent" })
|
||||
}
|
||||
}
|
||||
}),
|
||||
disclosure: {
|
||||
...text(theme.lowest, "sans", "base"),
|
||||
button: toggleable_icon_button(theme, {}),
|
||||
button: icon_button({ variant: "ghost" }),
|
||||
spacing: 4,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user