mirror of
https://github.com/langgenius/dify.git
synced 2026-04-15 01:38:19 +08:00
fix: action buttion ui
This commit is contained in:
parent
bca94854f7
commit
846555af1b
@ -2,9 +2,7 @@
|
||||
|
||||
@layer components {
|
||||
.action-btn {
|
||||
@apply inline-flex justify-center items-center cursor-pointer text-text-tertiary
|
||||
hover:text-text-secondary
|
||||
hover:bg-state-base-hover
|
||||
@apply inline-flex justify-center items-center cursor-pointer text-text-tertiary hover:text-text-secondary hover:bg-state-base-hover
|
||||
}
|
||||
|
||||
.action-btn-disabled {
|
||||
@ -29,21 +27,15 @@
|
||||
}
|
||||
|
||||
.action-btn.action-btn-active {
|
||||
@apply
|
||||
text-text-accent
|
||||
bg-state-accent-active
|
||||
hover:bg-state-accent-active-alt
|
||||
@apply text-text-accent bg-state-accent-active hover:bg-state-accent-active-alt
|
||||
}
|
||||
|
||||
.action-btn.action-btn-disabled {
|
||||
@apply
|
||||
text-text-disabled
|
||||
@apply text-text-disabled
|
||||
}
|
||||
|
||||
.action-btn.action-btn-destructive {
|
||||
@apply
|
||||
text-text-destructive
|
||||
bg-state-destructive-hover
|
||||
@apply text-text-destructive bg-state-destructive-hover
|
||||
}
|
||||
|
||||
}
|
||||
@ -28,7 +28,7 @@ const actionButtonVariants = cva(
|
||||
)
|
||||
|
||||
export type ActionButtonProps = {
|
||||
size?: 'xs' | 'm' | 'l' | 'xl'
|
||||
size?: 'xs' | 's' | 'm' | 'l' | 'xl'
|
||||
state?: ActionButtonState
|
||||
styleCss?: CSSProperties
|
||||
} & React.ButtonHTMLAttributes<HTMLButtonElement> & VariantProps<typeof actionButtonVariants>
|
||||
|
||||
@ -33,21 +33,21 @@ const Action: FC<Props> = ({
|
||||
return (
|
||||
<div className='flex space-x-1'>
|
||||
{isShowFetchNewVersion
|
||||
&& <div className='p-0.5 cursor-pointer' onClick={handleFetchNewVersion}>
|
||||
<RiLoopLeftLine className='w-5 h-5 text-text-tertiary' />
|
||||
</div>
|
||||
&& <ActionButton onClick={handleFetchNewVersion}>
|
||||
<RiLoopLeftLine className='w-4 h-4 text-text-tertiary' />
|
||||
</ActionButton>
|
||||
}
|
||||
{
|
||||
isShowInfo
|
||||
&& <ActionButton onClick={showPluginInfo}>
|
||||
<RiInformation2Line className='w-5 h-5 text-text-tertiary' />
|
||||
<RiInformation2Line className='w-4 h-4 text-text-tertiary' />
|
||||
</ActionButton>
|
||||
}
|
||||
{
|
||||
isShowDelete
|
||||
&& <div className='p-0.5 cursor-pointer' onClick={onDelete}>
|
||||
<RiDeleteBinLine className='w-5 h-5 text-text-tertiary' />
|
||||
</div>
|
||||
&& <ActionButton className='hover:bg-state-destructive-hover text-text-tertiary hover:text-text-destructive' onClick={onDelete}>
|
||||
<RiDeleteBinLine className='w-4 h-4' />
|
||||
</ActionButton>
|
||||
}
|
||||
|
||||
{isShowPluginInfo && (
|
||||
|
||||
Loading…
Reference in New Issue
Block a user