Devendra174's picture
Upload folder using huggingface_hub
1e92f2d verified
raw
history blame
600 Bytes
import React from 'react';
import { useQueryRules, UseQueryRulesProps } from 'react-instantsearch-hooks';
import { cx } from '../cx';
export type QueryRuleCustomDataProps = Omit<
React.ComponentProps<'div'>,
'children'
> &
Partial<Pick<UseQueryRulesProps, 'transformItems'>> & {
children: (options: { items: any[] }) => React.ReactNode;
};
export function QueryRuleCustomData(props: QueryRuleCustomDataProps) {
const { items } = useQueryRules(props);
return (
<div className={cx('ais-QueryRuleCustomData', props.className)}>
{props.children({ items })}
</div>
);
}