@dnb/eufemia
Version:
DNB Eufemia Design System UI Library
61 lines (60 loc) • 2.04 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _index = _interopRequireDefault(require("../String/index.js"));
var _useTranslation = _interopRequireDefault(require("../../hooks/useTranslation.js"));
var _withComponentMarkers = _interopRequireDefault(require("../../../../shared/helpers/withComponentMarkers.js"));
var _jsxRuntime = require("react/jsx-runtime");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
function Name(props) {
const StringValueProps = {
...props
};
return (0, _jsxRuntime.jsx)(_index.default, {
...StringValueProps
});
}
(0, _withComponentMarkers.default)(Name, {
_supportsSpacingProps: true
});
Name.First = function FirstName(props) {
var _props$label;
const translations = (0, _useTranslation.default)();
const nameProps = {
...props,
label: (_props$label = props.label) !== null && _props$label !== void 0 ? _props$label : translations.FirstName.label
};
return (0, _jsxRuntime.jsx)(Name, {
...nameProps
});
};
Name.First['_supportsSpacingProps'] = true;
Name.Last = function LastName(props) {
var _props$label2;
const translations = (0, _useTranslation.default)();
const nameProps = {
...props,
label: (_props$label2 = props.label) !== null && _props$label2 !== void 0 ? _props$label2 : translations.LastName.label
};
return (0, _jsxRuntime.jsx)(Name, {
...nameProps
});
};
Name.Last['_supportsSpacingProps'] = true;
Name.Company = function CompanyName(props) {
var _props$label3;
const translations = (0, _useTranslation.default)();
const nameProps = {
...props,
label: (_props$label3 = props.label) !== null && _props$label3 !== void 0 ? _props$label3 : translations.CompanyName.label
};
return (0, _jsxRuntime.jsx)(Name, {
...nameProps
});
};
Name.Company['_supportsSpacingProps'] = true;
var _default = exports.default = Name;
//# sourceMappingURL=Name.js.map