add template-function-datetime (#244)

This commit is contained in:
Song
2025-07-24 03:41:24 +08:00
committed by GitHub
parent c09083ddec
commit 0b38948826
20 changed files with 331 additions and 51 deletions

View File

@@ -279,7 +279,7 @@ export const Editor = forwardRef<EditorView | undefined, EditorProps>(function E
const show = () =>
showDialog({
id: 'template-function-' + Math.random(), // Allow multiple at once
size: 'sm',
size: 'md',
title: <InlineCode>{fn.name}()</InlineCode>,
description: fn.description,
render: ({ hide }) => (

View File

@@ -142,7 +142,7 @@ export const Icon = memo(function Icon({
title={title}
className={classNames(
className,
!spin && 'transform-cpu',
!spin && 'transform-gpu',
spin && 'animate-spin',
'flex-shrink-0',
size === 'xl' && 'h-6 w-6',

View File

@@ -9,6 +9,7 @@ type Props = Omit<TooltipProps, 'children'> & {
iconSize?: IconProps['size'];
iconColor?: IconProps['color'];
className?: string;
tabIndex?: number;
};
export function IconTooltip({

View File

@@ -519,7 +519,7 @@ function EncryptionInput({
color="danger"
size={props.size}
className="text-sm"
rightSlot={<IconTooltip content={state.error} icon="alert_triangle" />}
rightSlot={<IconTooltip tabIndex={-1} content={state.error} icon="alert_triangle" />}
onClick={() => {
setupOrConfigureEncryption();
}}

View File

@@ -39,7 +39,7 @@ export function Label({
({tag})
</span>
))}
{help && <IconTooltip content={help} />}
{help && <IconTooltip tabIndex={-1} content={help} />}
</label>
);
}