UNPKG

@dnb/eufemia

Version:

DNB Eufemia Design System UI Library

32 lines 1.15 kB
import React from 'react'; import StringValue from "../String/index.js"; import useTranslation from "../../hooks/useTranslation.js"; function Address(props) { const stringProps = { ...props }; return React.createElement(StringValue, stringProps); } Address._supportsSpacingProps = true; Address.Postal = function PostalAddress(props) { var _props$label; const translations = useTranslation(); const postalAddressProps = { ...props, label: (_props$label = props.label) !== null && _props$label !== void 0 ? _props$label : translations.PostalAddress.label }; return React.createElement(Address, postalAddressProps); }; Address.Postal['_supportsSpacingProps'] = true; Address.Street = function StreetAddress(props) { var _props$label2; const translations = useTranslation(); const streetAddressProps = { ...props, label: (_props$label2 = props.label) !== null && _props$label2 !== void 0 ? _props$label2 : translations.StreetAddress.label }; return React.createElement(Address, streetAddressProps); }; Address.Street['_supportsSpacingProps'] = true; export default Address; //# sourceMappingURL=Address.js.map