How to use @skbkontur/react-ui - 5 common examples

To help you get started, we’ve selected a few @skbkontur/react-ui 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 kontur-edu / Ulearn / src / Frontend / src / components / common / ErrorBoundary.js View on Github external
render() {
		if (this.state.error) {
			/* render fallback UI */
			return (
				
					<div> Raven.lastEventId() &amp;&amp; Raven.showReportDialog()}&gt;
						<p>We're sorry — something's gone wrong.</p>
						<p>Our team has been notified, but click here fill out a report.</p>
					</div>
					{Toast.push('Произошла ошибка. Попробуйте перезагрузить страницу.')}
				
			);
		}
		/* when there's not an error, render children untouched */
		return this.props.children;
	}
}
github kontur-edu / Ulearn / src / Frontend / src / components / flashcards / Flashcards / Flashcards.js View on Github external
startCourseRepeating() {
		const { flashcards, infoByUnits } = this.props;

		const unlockedCourseFlashcards = Flashcards.getUnlockedCourseFlashcards(flashcards, infoByUnits);
		const maxLastRateIndex = Flashcards.findMaxLastRateIndex(unlockedCourseFlashcards);

		Toast.push('Переход к повторению по курсу');

		this.setState({
			onUnit: false,
			onUnitRepeating: false,
			sessionFlashcards: unlockedCourseFlashcards,
			totalFlashcardsCount: unlockedCourseFlashcards.length,
			maxLastRateIndex,
			statistics: countFlashcardsStatistics(unlockedCourseFlashcards),
			currentFlashcard: getNextFlashcardRandomly(unlockedCourseFlashcards, maxLastRateIndex),
		});
	}
github kontur-edu / Ulearn / src / Frontend / src / components / common / Error / HeaderComponentErrorBoundary.js View on Github external
componentDidCatch(error, errorInfo) {
		this.setState({error});
		Raven.captureException(error, {extra: errorInfo});
		Toast.push('Произошла ошибка. Попробуйте перезагрузить страницу.');
	}
github kontur-edu / Ulearn / src / Frontend / src / components / groups / GroupSettingsPage / GroupMembers / InviteBlock / InviteBlock.js View on Github external
						<button>} onClick={() =&gt; Toast.push('Ссылка скопирована')}&gt;
							Скопировать ссылку</button>
github skbkontur / react-ui-tour / src / lib / components / tooltip / TooltipHighlight.tsx View on Github external
componentDidMount() {
    if (!this.state.hasElem) return;
    this.target = this.props.targetGetter();
    this.reflow();

    //add throttle
    this._layoutEventsToken = LayoutEvents.addListener(this.reflow);
  }

@skbkontur/react-ui

UI Components

MIT
Latest version published 14 days ago

Package Health Score

87 / 100
Full package analysis

Similar packages