+import classNames from "classnames";
import { Component, FormEventHandler, linkEvent } from "inferno";
import { EditSite, LocalSiteRateLimit } from "lemmy-js-client";
import { i18n } from "../../i18next";
handleRateLimitPerSecond: FormEventHandler<HTMLInputElement>;
rateLimitValue?: number;
rateLimitPerSecondValue?: number;
+ className?: string;
}
interface RateLimitFormProps {
handleRateLimitPerSecond,
rateLimitPerSecondValue,
rateLimitValue,
+ className,
}: RateLimitsProps) {
return (
- <div className="mb-3 row">
+ <div role="tabpanel" className={classNames("mb-3 row", className)}>
<div className="col-md-6">
<label htmlFor="rate-limit">{i18n.t("rate_limit")}</label>
<input
tabs={rateLimitTypes.map(rateLimitType => ({
key: rateLimitType,
label: i18n.t(`rate_limit_${rateLimitType}`),
- getNode: () => (
+ getNode: isSelected => (
<RateLimits
+ className={classNames("tab-pane show", {
+ active: isSelected,
+ })}
handleRateLimit={linkEvent(
{ rateLimitType, ctx: this },
handleRateLimitChange