Perf input guide (#1557)

* perf: input guide code

* perf: input guide ui

* Chat input guide api

* Update app chat config store

* perf: app chat config field

* perf: app context

* perf: params

* fix: ts

* perf: filter private config

* perf: filter private config

* perf: import workflow

* perf: limit max tip amount
This commit is contained in:
Archer
2024-05-21 17:52:04 +08:00
committed by GitHub
parent 8e8ceb7439
commit fb368a581c
123 changed files with 2124 additions and 1805 deletions

View File

@@ -3,24 +3,28 @@ import { Flex, Input, InputProps } from '@chakra-ui/react';
interface Props extends InputProps {
leftIcon?: React.ReactNode;
rightIcon?: React.ReactNode;
}
const MyInput = ({ leftIcon, ...props }: Props) => {
const MyInput = ({ leftIcon, rightIcon, ...props }: Props) => {
return (
<Flex position={'relative'} alignItems={'center'}>
<Input w={'100%'} pl={leftIcon ? '30px !important' : 3} {...props} />
<Flex h={'100%'} position={'relative'} alignItems={'center'}>
<Input
w={'100%'}
pl={leftIcon ? '34px !important' : 3}
pr={rightIcon ? '34px !important' : 3}
{...props}
/>
{leftIcon && (
<Flex
alignItems={'center'}
position={'absolute'}
left={3}
w={'20px'}
zIndex={10}
transform={'translateY(1.5px)'}
>
<Flex alignItems={'center'} position={'absolute'} left={3} w={'20px'} zIndex={10}>
{leftIcon}
</Flex>
)}
{rightIcon && (
<Flex alignItems={'center'} position={'absolute'} right={3} w={'20px'} zIndex={10}>
{rightIcon}
</Flex>
)}
</Flex>
);
};