UNPKG

@dnb/eufemia

Version:

DNB Eufemia Design System UI Library

42 lines 1.44 kB
import React from 'react'; import StringValue from "../String/index.js"; import useTranslation from "../../hooks/useTranslation.js"; function Name(props) { const StringValueProps = { ...props }; return React.createElement(StringValue, StringValueProps); } 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 React.createElement(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 React.createElement(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 React.createElement(Name, nameProps); }; Name.Company['_supportsSpacingProps'] = true; export default Name; //# sourceMappingURL=Name.js.map