Skip to content

Commit

Permalink
allow toggle color customisation
Browse files Browse the repository at this point in the history
  • Loading branch information
willydouhard committed Oct 17, 2023
1 parent 82d4c16 commit 40b63f6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions frontend/src/components/molecules/chatProfiles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { Box, Popover, Tab, Tabs } from '@mui/material';
import {
InputStateHandler,
grey,
primary,
useChat,
useIsDarkMode
} from '@chainlit/components';
Expand Down Expand Up @@ -101,7 +100,9 @@ export default function ChatProfiles() {
},
'& .MuiTabs-indicator': {
background: (theme) =>
isDarkMode ? theme.palette.divider : primary[600],
isDarkMode
? theme.palette.divider
: theme.palette.primary.main,
height: '100%',
borderRadius: '5px'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ const _ConversationsHistorySidebar = () => {
onScroll: handleScroll
}}
sx={{
width: settings.isChatHistoryOpen ? DRAWER_WIDTH : 0,
width: settings.isChatHistoryOpen ? 'auto' : 0,
'& .MuiDrawer-paper': {
width: settings.isChatHistoryOpen ? DRAWER_WIDTH : 0,
position: 'inherit',
Expand Down
4 changes: 2 additions & 2 deletions libs/components/src/buttons/Toggle.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useIsDarkMode } from 'hooks';
import React from 'react';
import { InputStateHandler } from 'src/inputs';
import { grey, primary } from 'theme';
import { grey } from 'theme';

import Box from '@mui/material/Box';
import Tab from '@mui/material/Tab';
Expand Down Expand Up @@ -59,7 +59,7 @@ const Toggle = (props: ToggleProps): JSX.Element => {
},
'& .MuiTabs-indicator': {
background: (theme) =>
isDarkMode ? theme.palette.divider : primary[600],
isDarkMode ? theme.palette.divider : theme.palette.primary.main,
height: '100%',
borderRadius: '5px'
}
Expand Down

0 comments on commit 40b63f6

Please sign in to comment.