@dnb/eufemia
Version:
DNB Eufemia Design System UI Library
42 lines • 1.31 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 Address(props) {
const stringProps = {
...props
};
return _jsx(StringValue, {
...stringProps
});
}
withComponentMarkers(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 _jsx(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 _jsx(Address, {
...streetAddressProps
});
};
Address.Street['_supportsSpacingProps'] = true;
export default Address;
//# sourceMappingURL=Address.js.map