Remove project divider in titlebar
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
export * from "./icon_button"
|
||||
export * from "./indicator"
|
||||
export * from "./input"
|
||||
export * from "./tab"
|
||||
export * from "./tab_bar_button"
|
||||
export * from "./text_button"
|
||||
@@ -1,41 +0,0 @@
|
||||
type MarginOptions = {
|
||||
all?: number
|
||||
left?: number
|
||||
right?: number
|
||||
top?: number
|
||||
bottom?: number
|
||||
}
|
||||
|
||||
export type MarginStyle = {
|
||||
top: number
|
||||
bottom: number
|
||||
left: number
|
||||
right: number
|
||||
}
|
||||
|
||||
export const margin_style = (options: MarginOptions): MarginStyle => {
|
||||
const { all, top, bottom, left, right } = options
|
||||
|
||||
if (all !== undefined)
|
||||
return {
|
||||
top: all,
|
||||
bottom: all,
|
||||
left: all,
|
||||
right: all,
|
||||
}
|
||||
|
||||
if (
|
||||
top === undefined &&
|
||||
bottom === undefined &&
|
||||
left === undefined &&
|
||||
right === undefined
|
||||
)
|
||||
throw new Error("Margin must have at least one value")
|
||||
|
||||
return {
|
||||
top: top || 0,
|
||||
bottom: bottom || 0,
|
||||
left: left || 0,
|
||||
right: right || 0,
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
type PaddingOptions = {
|
||||
all?: number
|
||||
left?: number
|
||||
right?: number
|
||||
top?: number
|
||||
bottom?: number
|
||||
}
|
||||
|
||||
export type PaddingStyle = {
|
||||
top: number
|
||||
bottom: number
|
||||
left: number
|
||||
right: number
|
||||
}
|
||||
|
||||
export const padding_style = (options: PaddingOptions): PaddingStyle => {
|
||||
const { all, top, bottom, left, right } = options
|
||||
|
||||
if (all !== undefined)
|
||||
return {
|
||||
top: all,
|
||||
bottom: all,
|
||||
left: all,
|
||||
right: all,
|
||||
}
|
||||
|
||||
if (
|
||||
top === undefined &&
|
||||
bottom === undefined &&
|
||||
left === undefined &&
|
||||
right === undefined
|
||||
)
|
||||
throw new Error("Padding must have at least one value")
|
||||
|
||||
return {
|
||||
top: top || 0,
|
||||
bottom: bottom || 0,
|
||||
left: left || 0,
|
||||
right: right || 0,
|
||||
}
|
||||
}
|
||||
@@ -74,31 +74,31 @@ export function text_button({
|
||||
hovered: disabled
|
||||
? {}
|
||||
: {
|
||||
background: background(
|
||||
layer ?? theme.lowest,
|
||||
color,
|
||||
"hovered"
|
||||
),
|
||||
color: foreground(
|
||||
layer ?? theme.lowest,
|
||||
color,
|
||||
"hovered"
|
||||
),
|
||||
},
|
||||
background: background(
|
||||
layer ?? theme.lowest,
|
||||
color,
|
||||
"hovered"
|
||||
),
|
||||
color: foreground(
|
||||
layer ?? theme.lowest,
|
||||
color,
|
||||
"hovered"
|
||||
),
|
||||
},
|
||||
clicked: disabled
|
||||
? {}
|
||||
: {
|
||||
background: background(
|
||||
layer ?? theme.lowest,
|
||||
color,
|
||||
"pressed"
|
||||
),
|
||||
color: foreground(
|
||||
layer ?? theme.lowest,
|
||||
color,
|
||||
"pressed"
|
||||
),
|
||||
},
|
||||
background: background(
|
||||
layer ?? theme.lowest,
|
||||
color,
|
||||
"pressed"
|
||||
),
|
||||
color: foreground(
|
||||
layer ?? theme.lowest,
|
||||
color,
|
||||
"pressed"
|
||||
),
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user