diff --git a/lib/client/components/logger/index.tsx b/lib/client/components/logger/index.tsx index a82d8e49d..80a47004c 100644 --- a/lib/client/components/logger/index.tsx +++ b/lib/client/components/logger/index.tsx @@ -28,7 +28,6 @@ import { generatePlainColor } from '~/root/lib/utils/color-generator'; import ReactPulsable from 'react-pulsable'; import { ChildrenProps } from '@kloudlite/design-system/types'; // import { mapper } from '@kloudlite/design-system/utils'; -// import Select from './log-select'; import { logsMockData } from './dummy'; import { LoadingIndicator } from '../reload-indicator'; import logger from '../../helpers/log'; @@ -395,9 +394,8 @@ const LogLine = ({ }: ILogLine) => { return ( { - const { innerProps, render, active, focused } = props; - return ( -
- {typeof render === 'string' - ? render - : render?.({ active: !!active, focused: !!focused })} -
- ); -}; - -const groupRender = ({ label }: IGroupRender) => { - return ( -
{label}
- ); -}; - -const Select = ( - props: ISelect & { - label?: ReactNode; - message?: ReactNode; - error?: boolean; - } -) => { - const { - value, - options, - label, - placeholder, - message, - error = false, - onChange, - disabled, - valueRender, - creatable, - multiple, - onSearch, - searchable, - showclear, - noOptionMessage, - open, - disableWhileLoading, - } = props; - - return ( -
-
- {label && ( -
{label}
- )} -
-
- { - const c = cn( - 'rounded flex flex-row items-center border outline-none cursor-default p-0 bodySm', - error && !disabled - ? 'bg-surface-critical-subdued border-text-critical text-text-critical' - : '' - ); - return { - default: `${c} border-none hljs`, - disabled: `${c} border-border-disabled text-text-disabled`, - focus: `${c} border-border-default text-text-default ring-offset-1 ring-2 ring-border-focus`, - }; - }} - open={open} - // container bg - menuClass="shadow-popover hljs" - menuItemRender={menuItemRender} - value={value} - options={options} - placeholder={ -
- {placeholder} -
- } - showclear={showclear} - // suffixRender={({ clear, showclear }) => - // suffixRender({ - // loading: loading || false, - // clear, - // showclear, - // error, - // disabled: !!disabled, - // }) - // } - onChange={onChange} - groupRender={groupRender} - disabled={disabled} - valueRender={valueRender} - creatable={creatable} - multiple={multiple} - onSearch={onSearch} - searchable={searchable} - noOptionMessage={noOptionMessage} - disableWhileLoading={disableWhileLoading} - /> -
-
-
- -
- {message} -
-
-
- ); -}; - -export default Select;