EN · DE · RU · FR · ES

#2639: AdditionalLabel.jsx

projectforge-webapp/src/components/design/input/AdditionalLabel.jsx Type: JavaScript/React · Role: Component · Source: projectforge-webapp/src/components/design/input/AdditionalLabel.jsx 21 lines · 17 code · 0 comments · 4 blank
React component for AdditionalLabel. Part of the ProjectForge web application frontend (React + CSS Modules + PropTypes).

Code Structure

Imports from: ./Input.module.scss, prop-types, react

Has PropTypes for: AdditionalLabel

Uses CSS Modules for styling.

Source Code (abridged)

import PropTypes from 'prop-types';
import React from 'react';
import style from './Input.module.scss';

function AdditionalLabel({ title }) {
    if (!title) {
        return null;
    }

    return (
        <div className={style.additionalLabel}>
            <span>{title}</span>
        </div>
    );
}

AdditionalLabel.propTypes = {
    title: PropTypes.string,
};

export default AdditionalLabel;

Git History

3685edd6c lift to react 18 wip
253b9f38b update some deps and fix eslint errors
bbd81edc3 es-lint, new js versions.
f6d5e48b4 WIP: new input field structure
8c6ab09ae add additional label to input fields