mirror of https://github.com/langgenius/dify.git
fix: add transparent border to prevent button size flickering (#30128)
This commit is contained in:
parent
44fc0c614c
commit
f08d847c20
|
|
@ -188,8 +188,8 @@ const FeaturesTrigger = () => {
|
||||||
{isChatMode && (
|
{isChatMode && (
|
||||||
<Button
|
<Button
|
||||||
className={cn(
|
className={cn(
|
||||||
'text-components-button-secondary-text',
|
'rounded-lg border border-transparent text-components-button-secondary-text',
|
||||||
theme === 'dark' && 'rounded-lg border border-black/5 bg-white/10 backdrop-blur-sm',
|
theme === 'dark' && 'border-black/5 bg-white/10 backdrop-blur-sm',
|
||||||
)}
|
)}
|
||||||
onClick={handleShowFeatures}
|
onClick={handleShowFeatures}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,8 @@ const ChatVariableButton = ({ disabled }: { disabled: boolean }) => {
|
||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
className={cn(
|
className={cn(
|
||||||
'p-2',
|
'rounded-lg border border-transparent p-2',
|
||||||
theme === 'dark' && showChatVariablePanel && 'rounded-lg border border-black/5 bg-white/10 backdrop-blur-sm',
|
theme === 'dark' && showChatVariablePanel && 'border-black/5 bg-white/10 backdrop-blur-sm',
|
||||||
)}
|
)}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
onClick={handleClick}
|
onClick={handleClick}
|
||||||
|
|
|
||||||
|
|
@ -26,8 +26,8 @@ const EnvButton = ({ disabled }: { disabled: boolean }) => {
|
||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
className={cn(
|
className={cn(
|
||||||
'p-2',
|
'rounded-lg border border-transparent p-2',
|
||||||
theme === 'dark' && showEnvPanel && 'rounded-lg border border-black/5 bg-white/10 backdrop-blur-sm',
|
theme === 'dark' && showEnvPanel && 'border-black/5 bg-white/10 backdrop-blur-sm',
|
||||||
)}
|
)}
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
|
|
|
||||||
|
|
@ -26,8 +26,8 @@ const GlobalVariableButton = ({ disabled }: { disabled: boolean }) => {
|
||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
className={cn(
|
className={cn(
|
||||||
'p-2',
|
'rounded-lg border border-transparent p-2',
|
||||||
theme === 'dark' && showGlobalVariablePanel && 'rounded-lg border border-black/5 bg-white/10 backdrop-blur-sm',
|
theme === 'dark' && showGlobalVariablePanel && 'border-black/5 bg-white/10 backdrop-blur-sm',
|
||||||
)}
|
)}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
onClick={handleClick}
|
onClick={handleClick}
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,8 @@ const HeaderInRestoring = ({
|
||||||
disabled={!currentVersion || currentVersion.version === WorkflowVersion.Draft}
|
disabled={!currentVersion || currentVersion.version === WorkflowVersion.Draft}
|
||||||
variant="primary"
|
variant="primary"
|
||||||
className={cn(
|
className={cn(
|
||||||
theme === 'dark' && 'rounded-lg border border-black/5 bg-white/10 backdrop-blur-sm',
|
'rounded-lg border border-transparent',
|
||||||
|
theme === 'dark' && 'border-black/5 bg-white/10 backdrop-blur-sm',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{t('workflow.common.restore')}
|
{t('workflow.common.restore')}
|
||||||
|
|
@ -94,8 +95,8 @@ const HeaderInRestoring = ({
|
||||||
<Button
|
<Button
|
||||||
onClick={handleCancelRestore}
|
onClick={handleCancelRestore}
|
||||||
className={cn(
|
className={cn(
|
||||||
'text-components-button-secondary-accent-text',
|
'rounded-lg border border-transparent text-components-button-secondary-accent-text',
|
||||||
theme === 'dark' && 'rounded-lg border border-black/5 bg-white/10 backdrop-blur-sm',
|
theme === 'dark' && 'border-black/5 bg-white/10 backdrop-blur-sm',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<div className="flex items-center gap-x-0.5">
|
<div className="flex items-center gap-x-0.5">
|
||||||
|
|
|
||||||
|
|
@ -61,8 +61,8 @@ const VersionHistoryButton: FC<VersionHistoryButtonProps> = ({
|
||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
className={cn(
|
className={cn(
|
||||||
'p-2',
|
'p-2 rounded-lg border border-transparent',
|
||||||
theme === 'dark' && 'rounded-lg border border-black/5 bg-white/10 backdrop-blur-sm',
|
theme === 'dark' && 'border-black/5 bg-white/10 backdrop-blur-sm',
|
||||||
)}
|
)}
|
||||||
onClick={handleViewVersionHistory}
|
onClick={handleViewVersionHistory}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue