mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 06:25:45 +01:00
Implement new form features
Extends existing functionality, provides new fallbacks for translations and adds capabilities to manage array properties in configurations. Committed-by: Florian Scholdei <florian.scholdei@cloudogu.com> Co-authored-by: Florian Scholdei <florian.scholdei@cloudogu.com>
This commit is contained in:
committed by
SCM-Manager
parent
719f6c4c09
commit
dda52b8400
@@ -21,7 +21,7 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
import React from "react";
|
||||
import React, { FC } from "react";
|
||||
import classNames from "classnames";
|
||||
|
||||
type Props = {
|
||||
@@ -29,16 +29,13 @@ type Props = {
|
||||
className?: string;
|
||||
};
|
||||
|
||||
class Subtitle extends React.Component<Props> {
|
||||
render() {
|
||||
const { subtitle, className, children } = this.props;
|
||||
if (subtitle) {
|
||||
return <h2 className={classNames("subtitle", className)}>{subtitle}</h2>;
|
||||
} else if (children) {
|
||||
return <h2 className={classNames("subtitle", className)}>{children}</h2>;
|
||||
}
|
||||
return null;
|
||||
const Subtitle: FC<Props> = ({ subtitle, className, children }) => {
|
||||
if (subtitle) {
|
||||
return <h2 className={classNames("subtitle", className)}>{subtitle}</h2>;
|
||||
} else if (children) {
|
||||
return <h2 className={classNames("subtitle", className)}>{children}</h2>;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
export default Subtitle;
|
||||
|
||||
Reference in New Issue
Block a user