mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 12:54:38 +03:00
* Update localforage, remove query-string * Update fontawesome and flag-icons * Update formatjs * Update axios and videojs * Update apollo client and graphql * Update bootstrap and react * Update polyfills * Update vite * Update ESLint * Update stylelint * Update configs * Rebuild yarn.lock
31 lines
715 B
TypeScript
31 lines
715 B
TypeScript
import React, { PropsWithChildren } from "react";
|
|
import { Card } from "react-bootstrap";
|
|
import { useIntl } from "react-intl";
|
|
|
|
interface ISettingGroup {
|
|
id?: string;
|
|
headingID?: string;
|
|
subHeadingID?: string;
|
|
}
|
|
|
|
export const SettingSection: React.FC<PropsWithChildren<ISettingGroup>> = ({
|
|
id,
|
|
children,
|
|
headingID,
|
|
subHeadingID,
|
|
}) => {
|
|
const intl = useIntl();
|
|
|
|
return (
|
|
<div className="setting-section" id={id}>
|
|
<h1>{headingID ? intl.formatMessage({ id: headingID }) : undefined}</h1>
|
|
{subHeadingID ? (
|
|
<div className="sub-heading">
|
|
{intl.formatMessage({ id: subHeadingID })}
|
|
</div>
|
|
) : undefined}
|
|
<Card>{children}</Card>
|
|
</div>
|
|
);
|
|
};
|