Merge pull request #424 from webzard-io/improve/xzdry

Fix some style problems
This commit is contained in:
tanbowensg 2022-05-31 13:45:13 +08:00 committed by GitHub
commit 6bf70f85ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 4 deletions

View File

@ -104,6 +104,10 @@ export const Select = implementRuntimeComponent({
value={value}
{...cProps}
showSearch={showSearch}
filterOption={(inputValue, option) =>
option.props.value.toLowerCase().indexOf(inputValue.toLowerCase()) >= 0 ||
option.props.children.toLowerCase().indexOf(inputValue.toLowerCase()) >= 0
}
dropdownRender={menu => {
return (
<div className={css(customStyle?.dropdownRenderWrap)}>

View File

@ -24,6 +24,12 @@ const TableRowStyle = css`
padding-bottom: var(--chakra-space-1);
border-bottom-width: 1px;
border-color: var(--chakra-colors-gray-100);
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
& > th:last-child {
width: 76px;
}
`;
@ -99,7 +105,7 @@ export const ArrayTable: React.FC<ArrayTableProps> = props => {
return (
<div className={TableWrapperStyle}>
<Table size="sm">
<Table size="sm" sx={{ tableLayout: 'fixed' }}>
<Thead>
<Tr className={TableRowStyle}>
<Th width="24px" />
@ -109,7 +115,7 @@ export const ArrayTable: React.FC<ArrayTableProps> = props => {
return <Th key={key}>{title}</Th>;
})}
<Th key="button" display="flex" justifyContent="end">
<Th key="button">
<IconButton
aria-label="add"
icon={<AddIcon />}

View File

@ -12,9 +12,10 @@ export const GeneralModal: React.FC<{
onClose: () => void;
title: string;
size?: string;
}> = ({ title, onClose, size = 'full', children }) => {
scrollBehavior?: 'inside' | 'outside';
}> = ({ title, onClose, size = 'full', children, scrollBehavior = 'inside' }) => {
return (
<Modal onClose={onClose} size={size} isOpen>
<Modal onClose={onClose} scrollBehavior={scrollBehavior} size={size} isOpen>
<ModalOverlay />
<ModalContent>
<ModalHeader>{title}</ModalHeader>