How to use the @talend/react-components/lib/Badge.SIZES function in @talend/react-components

To help you get started, we’ve selected a few @talend/react-components examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Talend / ui / packages / faceted-search / src / components / Badges / BadgeOperator / BadgeOperatorOverlay.component.js View on Github external
)}
			
		
	);
};

BadgeOperatorOverlay.propTypes = {
	id: PropTypes.string.isRequired,
	onClick: PropTypes.func,
	onChangeOverlay: PropTypes.func,
	onHideOverlay: PropTypes.func,
	opened: PropTypes.bool,
	operatorIconName: PropTypes.string,
	operatorLabel: PropTypes.string,
	operators: operatorsPropTypes.isRequired,
	size: PropTypes.oneOf(Object.values(Badge.SIZES)),
};

// eslint-disable-next-line import/prefer-default-export
export { BadgeOperatorOverlay };
github Talend / ui / packages / faceted-search / src / components / Badges / BadgeFaceted / BadgeFaceted.component.js View on Github external
/>
		
	);
};

BadgeFaceted.propTypes = {
	badgeId: PropTypes.string.isRequired,
	labelCategory: PropTypes.string.isRequired,
	children: PropTypes.func.isRequired,
	id: PropTypes.string.isRequired,
	initialOperatorOpened: PropTypes.bool,
	initialValueOpened: PropTypes.bool,
	labelValue: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),
	operator: operatorPropTypes.isRequired,
	operators: operatorsPropTypes.isRequired,
	size: PropTypes.oneOf(Object.values(Badge.SIZES)),
	value: PropTypes.any,
	t: PropTypes.func.isRequired,
};

// eslint-disable-next-line import/prefer-default-export
export { BadgeFaceted };
github Talend / ui / packages / faceted-search / src / components / Badges / BadgeOperator / BadgeOperatorOverlay.component.js View on Github external
if (onClick) {
			onClick(event, name, setOverlayOpened);
		}
	};

	const onHide = event => {
		if (onHideOverlay) {
			onHideOverlay(event);
		}
	};

	return (
		<div>
			
				{setOverlayOpened =&gt; (
					</div>
github Talend / ui / packages / faceted-search / src / components / Badges / BadgeFaceted / BadgeFaceted.component.js View on Github external
const BadgeFaceted = ({
	badgeId,
	children,
	id,
	labelCategory,
	labelValue,
	initialOperatorOpened,
	initialValueOpened,
	operator,
	operators,
	value,
	size = Badge.SIZES.large,
	t,
}) => {
	const [
		overlayState,
		overlayDispatch,
		onChangeOperatorOverlay,
		onChangeValueOverlay,
	] = useBadgeOverlayFlow(initialOperatorOpened, initialValueOpened);

	const { dispatch } = useBadgeFacetedContext();
	const [badgeOperator, setBadgeOperator] = useState(operator);
	const [badgeValue, setBadgeValue] = useState(value);

	const onChangeOperator = (_, operatorName) => {
		const foundOperator = operators.find(findOperatorByName(operatorName));
		if (foundOperator) {
github Talend / ui / packages / faceted-search / src / components / Badges / BadgeOperator / BadgeOperatorOverlay.component.js View on Github external
const onClickRow = setOverlayOpened =&gt; (event, name) =&gt; {
		if (onClick) {
			onClick(event, name, setOverlayOpened);
		}
	};

	const onHide = event =&gt; {
		if (onHideOverlay) {
			onHideOverlay(event);
		}
	};

	return (
		<div>
			
				{setOverlayOpened =&gt; (
					</div>