File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ export interface Props {
99 type ?: ButtonHTMLAttributes < HTMLButtonElement > [ 'type' ]
1010 onClick ?: ( ) => void
1111 isLoading ?: boolean
12- size ?: 'small' | 'normal'
12+ size ?: 'small' | 'normal' | 'tiny'
1313 icon ?: ReactNode
1414}
1515
@@ -20,8 +20,9 @@ const Button: FC<Props> = (props) => {
2020 < button
2121 type = { type }
2222 className = { cx (
23- size === 'normal' ? 'rounded-full' : 'rounded-xl' ,
24- size === 'normal' ? 'text-base font-medium px-6 py-[5px]' : 'text-sm px-4 py-1' ,
23+ size === 'normal' && 'text-base font-medium px-6 py-[5px] rounded-full' ,
24+ size === 'small' && 'text-sm px-4 py-1 rounded-xl' ,
25+ size === 'tiny' && 'text-xs px-3 py-[3px] rounded-lg' ,
2526 props . color === 'primary' ? 'text-white bg-primary-blue' : 'text-primary-text bg-secondary' ,
2627 props . className ,
2728 ) }
Original file line number Diff line number Diff line change @@ -194,9 +194,7 @@ const ChatMessageInput: FC<Props> = (props) => {
194194 autoFocus = { props . autoFocus }
195195 />
196196 </ div >
197- { props . actionButton || (
198- < Button text = "-" className = "invisible" size = { props . mode === 'full' ? 'normal' : 'small' } />
199- ) }
197+ { props . actionButton || < Button text = "-" className = "invisible" size = { props . mode === 'full' ? 'normal' : 'tiny' } /> }
200198 </ form >
201199 )
202200}
Original file line number Diff line number Diff line change @@ -70,12 +70,7 @@ const ConversationPanel: FC<Props> = (props) => {
7070 let inputActionButton : ReactNode = null
7171 if ( props . generating ) {
7272 inputActionButton = (
73- < Button
74- text = { t ( 'Stop' ) }
75- color = "flat"
76- size = { mode === 'full' ? 'normal' : 'small' }
77- onClick = { props . stopGenerating }
78- />
73+ < Button text = { t ( 'Stop' ) } color = "flat" size = { mode === 'full' ? 'normal' : 'tiny' } onClick = { props . stopGenerating } />
7974 )
8075 } else if ( mode === 'full' ) {
8176 inputActionButton = (
@@ -123,7 +118,9 @@ const ConversationPanel: FC<Props> = (props) => {
123118 < ChatMessageList botId = { props . botId } messages = { props . messages } className = { marginClass } />
124119 < div className = { cx ( 'mt-3 flex flex-col ' , marginClass , mode === 'full' ? 'mb-3' : 'mb-[5px]' ) } >
125120 < div className = { cx ( 'flex flex-row items-center gap-[5px]' , mode === 'full' ? 'mb-3' : 'mb-0' ) } >
126- { mode === 'compact' && < span className = "font-medium text-xs text-light-text" > Send to { botInfo . name } </ span > }
121+ { mode === 'compact' && (
122+ < span className = "font-medium text-xs text-light-text cursor-default" > Send to { botInfo . name } </ span >
123+ ) }
127124 < hr className = "grow border-primary-border" />
128125 </ div >
129126 < ChatMessageInput
You can’t perform that action at this time.
0 commit comments