@dnb/eufemia
Version:
DNB Eufemia Design System UI Library
54 lines • 1.6 kB
JavaScript
import React from 'react';
import StringValue from "../String/index.js";
import useTranslation from "../../hooks/useTranslation.js";
import withComponentMarkers from "../../../../shared/helpers/withComponentMarkers.js";
import { jsx as _jsx } from "react/jsx-runtime";
function Name(props) {
const StringValueProps = {
...props
};
return _jsx(StringValue, {
...StringValueProps
});
}
withComponentMarkers(Name, {
_supportsSpacingProps: true
});
Name.First = function FirstName(props) {
var _props$label;
const translations = useTranslation();
const nameProps = {
...props,
label: (_props$label = props.label) !== null && _props$label !== void 0 ? _props$label : translations.FirstName.label
};
return _jsx(Name, {
...nameProps
});
};
Name.First['_supportsSpacingProps'] = true;
Name.Last = function LastName(props) {
var _props$label2;
const translations = useTranslation();
const nameProps = {
...props,
label: (_props$label2 = props.label) !== null && _props$label2 !== void 0 ? _props$label2 : translations.LastName.label
};
return _jsx(Name, {
...nameProps
});
};
Name.Last['_supportsSpacingProps'] = true;
Name.Company = function CompanyName(props) {
var _props$label3;
const translations = useTranslation();
const nameProps = {
...props,
label: (_props$label3 = props.label) !== null && _props$label3 !== void 0 ? _props$label3 : translations.CompanyName.label
};
return _jsx(Name, {
...nameProps
});
};
Name.Company['_supportsSpacingProps'] = true;
export default Name;
//# sourceMappingURL=Name.js.map