UNPKG

@dnb/eufemia

Version:

DNB Eufemia Design System UI Library

21 lines 743 B
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"; 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 React.createElement(DateComponent, dateValueProps); } DateOfBirth._supportsSpacingProps = true; export default DateOfBirth; //# sourceMappingURL=DateOfBirth.js.map