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:
1 parent
72b63dcd6a
commit
70f2c797f4
153 files changed
+2973
-2043
No files matched your search
@@ -5,7 +5,7 @@ import PropTypes from 'prop-types';
|
||||
const flex = 'flex flex-row justify-between items-center';
|
||||
const theme = 'bg-indigo-dark text-white';
|
||||
|
||||
const ListMenu = ({ items = [], renderer, onClick }) => {
|
||||
const ListMenu = ({ items = [], renderer, onClick = () => {} }) => {
|
||||
const [selectedIndex, setSelectedIndex] = useState(null);
|
||||
|
||||
const ListItem = ({ item, index, isSelected }) => {
|
||||
@@ -48,16 +48,10 @@ const ListMenu = ({ items = [], renderer, onClick }) => {
|
||||
);
|
||||
};
|
||||
|
||||
const noop = () => {};
|
||||
|
||||
ListMenu.propTypes = {
|
||||
items: PropTypes.array.isRequired,
|
||||
renderer: PropTypes.func.isRequired,
|
||||
onClick: PropTypes.func,
|
||||
};
|
||||
|
||||
ListMenu.defaultProps = {
|
||||
onClick: noop,
|
||||
};
|
||||
|
||||
export default ListMenu;
|
||||
Reference in new issue
Block a user