Update RegenerationButton and StopButton styles

- Update the background color to "#ED6A45"
- Update the font family and font size
- Update the button and icon colors to "#fff"
- Add hover and focus styles
This commit is contained in:
Rankin Zheng 2023-10-12 20:49:59 +08:00
parent db5dc53dc6
commit 6ea2f00258
2 changed files with 31 additions and 9 deletions

View File

@ -10,19 +10,30 @@ const RegenerationButton = observer(() => {
const { chat } = useMst(); const { chat } = useMst();
return (<Button return (<Button
size='xs' size='xs'
leftIcon={<IconRotateDot color='var(--vscode-button-foreground)' />}
sx={{ sx={{
backgroundColor: 'var(--vscode-button-background)', backgroundColor:"#ED6A45",
fontFamily: 'var(--vscode-editor-font-familyy)',
fontSize: 'var(--vscode-editor-font-size)',
color:"#fff",
"&:hover":{
backgroundColor:"#ED6A45",
opacity: 0.8,
},
"&:focus":{
backgroundColor:"#ED6A45",
opacity: 0.8,
}
}} }}
styles={{ styles={{
icon: { icon: {
color: 'var(--vscode-button-foreground)' color:"#fff",
}, },
label: { label: {
color: 'var(--vscode-button-foreground)',
fontSize: 'var(--vscode-editor-font-size)', fontSize: 'var(--vscode-editor-font-size)',
color:"#fff",
} }
}} }}
leftIcon={<IconRotateDot color='var(--vscode-button-foreground)' />}
onClick={() => chat.reGenerating()} onClick={() => chat.reGenerating()}
variant="white" > variant="white" >
Regeneration Regeneration

View File

@ -10,20 +10,31 @@ const StopButton = observer(() => {
const { chat } = useMst(); const { chat } = useMst();
return ( return (
<Button <Button
size='xs' size="xs"
leftIcon={<IconPlayerStop color='var(--vscode-button-foreground)' />}
sx={{ sx={{
backgroundColor: 'var(--vscode-button-background)', backgroundColor:"#ED6A45",
fontFamily: 'var(--vscode-editor-font-familyy)',
fontSize: 'var(--vscode-editor-font-size)',
color:"#fff",
"&:hover":{
backgroundColor:"#ED6A45",
opacity: 0.8,
},
"&:focus":{
backgroundColor:"#ED6A45",
opacity: 0.8,
}
}} }}
styles={{ styles={{
icon: { icon: {
color: 'var(--vscode-button-foreground)' color:"#fff",
}, },
label: { label: {
color: 'var(--vscode-button-foreground)',
fontSize: 'var(--vscode-editor-font-size)', fontSize: 'var(--vscode-editor-font-size)',
color:"#fff",
} }
}} }}
leftIcon={<IconPlayerStop color='var(--vscode-button-foreground)' />}
onClick={() => { onClick={() => {
chat.stopGenerating(false, '', chat.currentMessage); chat.stopGenerating(false, '', chat.currentMessage);
messageUtil.sendMessage({ messageUtil.sendMessage({