update sidebar

This commit is contained in:
end-4
2024-03-24 00:41:31 +07:00
parent 0d667b24dc
commit 63f084c8d7
3 changed files with 10 additions and 3 deletions
@@ -97,7 +97,7 @@ export const TabContainer = ({ icons, names, children, className = '', setup = (
export const IconTabContainer = ({
iconWidgets, names, children, className = '',
setup = () => { }, onChange = () => { },
tabsHpack = 'center',
tabsHpack = 'center', tabSwitcherClassName = '',
...rest
}) => {
const shownIndex = Variable(0);
@@ -106,7 +106,7 @@ export const IconTabContainer = ({
const tabs = Box({
homogeneous: true,
hpack: tabsHpack,
className: 'spacing-h-5',
className: `spacing-h-5 ${tabSwitcherClassName}`,
children: iconWidgets.map((icon, i) => Button({
className: 'tab-icon',
tooltipText: names[i],
@@ -180,6 +180,7 @@ const apiCommandStack = Stack({
})
export const apiContentStack = IconTabContainer({
tabSwitcherClassName: 'sidebar-chat-apiswitcher',
className: 'margin-top-5',
iconWidgets: APIS.map((api) => api.tabIcon),
names: APIS.map((api) => api.name),