style: set Independent Panel sidebar width to a fixed value and default collapsed

This commit is contained in:
josc146
2023-04-05 13:32:35 +08:00
parent 0a183a9ebf
commit c07e1b842b
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ import Browser from 'webextension-polyfill'
function App() {
const { t } = useTranslation()
const [collapsed, setCollapsed] = useState(false)
const [collapsed, setCollapsed] = useState(true)
const config = useConfig()
const [sessions, setSessions] = useState([])
const [sessionId, setSessionId] = useState(null)
+4 -1
View File
@@ -46,18 +46,21 @@
.chat-sidebar {
display: flex;
flex-direction: column;
min-width: 250px;
width: 250px;
background-color: var(--theme-color);
transition: width 0.3s;
transition: width 0.3s, min-width 0.3s;
padding: 10px;
}
.chat-sidebar.collapsed {
min-width: 60px;
width: 60px;
}
.chat-sidebar:hover,
.chat-sidebar:not(.collapsed) {
min-width: 250px;
width: 250px;
}