@dnb/eufemia
Version:
DNB Eufemia Design System UI Library
27 lines • 905 B
JavaScript
import React from 'react';
import DateComponent from "../Date/Date.js";
import useTranslation from "../../hooks/useTranslation.js";
import { DEFAULT_DATE_FORMAT } from "../../Field/DateOfBirth/DateOfBirth.js";
import withComponentMarkers from "../../../../shared/helpers/withComponentMarkers.js";
import { jsx as _jsx } from "react/jsx-runtime";
function DateOfBirth(props) {
var _props$label;
const translations = useTranslation().DateOfBirth;
const {
dateFormat = DEFAULT_DATE_FORMAT,
...otherProps
} = props;
const dateValueProps = {
...otherProps,
label: (_props$label = props.label) !== null && _props$label !== void 0 ? _props$label : translations.label,
dateFormat
};
return _jsx(DateComponent, {
...dateValueProps
});
}
withComponentMarkers(DateOfBirth, {
_supportsSpacingProps: true
});
export default DateOfBirth;
//# sourceMappingURL=DateOfBirth.js.map