feat(ui): move to React 18 and base for using shadcn/ui (#4174)

Co-authored-by: IbrahimCSAE <ibrahim.mdev@gmail.com>
This commit is contained in:
AlirezaandIbrahimCSAE authored and GitHub committed 2024-05-27 14:30:25 -04:00
1 parent 72b63dcd6a
commit 70f2c797f4
153 files changed
+2973 -2043

No files matched your search

+5 -11
View File
@@ -15,10 +15,10 @@ const Dialog = ({
actions,
onShow,
onSubmit,
header: HeaderComponent,
body: BodyComponent,
footer: FooterComponent,
value: defaultValue,
header: HeaderComponent = Header,
body: BodyComponent = Body,
footer: FooterComponent = Footer,
value: defaultValue = {},
}) => {
const [value, setValue] = useState(defaultValue);
@@ -78,13 +78,7 @@ Dialog.propTypes = {
type: PropTypes.oneOf(['primary', 'secondary', 'cancel']).isRequired,
})
).isRequired,
};
Dialog.defaultProps = {
header: Header,
footer: Footer,
body: Body,
value: {},
onShow: PropTypes.func,
};
export default Dialog;