mirror of
https://github.com/zhigang1992/react.git
synced 2026-02-09 09:03:51 +08:00
* feat(scaleable): add scaleable props to each component * chore(scaleable): update the exported type * feat: apply scaleable to components chore: remove with-default test: improve testcase for scaleable chore: resolve test warning ci: upgrade nodejs to latest lts docs: fix type error in document site * docs: update documents to be compatible with scaleable chore: fix build errors * chore: remove all size-related attributes docs: improve guide document * docs: add scaleable documentation test: update snapshots chore: remove unused * feat: add scaleable to grid components * docs: improve docs * test: update snapshots * fix(grid): fix basic component props
29 lines
730 B
TypeScript
29 lines
730 B
TypeScript
import React from 'react'
|
|
import AutoCompleteSearch from './auto-complete-searching'
|
|
|
|
interface Props {
|
|
hidden?: boolean
|
|
className?: string
|
|
}
|
|
|
|
const defaultProps = {
|
|
hidden: false,
|
|
className: '',
|
|
}
|
|
|
|
export type AutoCompleteEmptyProps = Props & React.HTMLAttributes<any>
|
|
|
|
const AutoCompleteEmpty: React.FC<React.PropsWithChildren<AutoCompleteEmptyProps>> = ({
|
|
children,
|
|
hidden,
|
|
className,
|
|
}: React.PropsWithChildren<AutoCompleteEmptyProps> & typeof defaultProps) => {
|
|
if (hidden) return null
|
|
return <AutoCompleteSearch className={className}>{children}</AutoCompleteSearch>
|
|
}
|
|
|
|
AutoCompleteEmpty.defaultProps = defaultProps
|
|
AutoCompleteEmpty.displayName = 'GeistAutoCompleteEmpty'
|
|
|
|
export default AutoCompleteEmpty
|