mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
* refactor(date): updated errorMessage story and modified to import props * docs(date): add errorMessageFunction examples * chore: add changeset * fix: remove unnecessary props * fix: typo
27 lines
507 B
TypeScript
27 lines
507 B
TypeScript
const App = `import {DatePicker} from "@nextui-org/react";
|
|
|
|
export default function App() {
|
|
return (
|
|
<div className="flex w-full flex-wrap md:flex-nowrap gap-4">
|
|
<DatePicker
|
|
label="Birth date"
|
|
className="max-w-[284px]"
|
|
isInvalid
|
|
errorMessage={(value) => {
|
|
if (value.isInvalid) {
|
|
return "Please enter a valid date.";
|
|
}
|
|
}}
|
|
/>
|
|
</div>
|
|
);
|
|
}`;
|
|
|
|
const react = {
|
|
"/App.jsx": App,
|
|
};
|
|
|
|
export default {
|
|
...react,
|
|
};
|