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

@@ -1,7 +1,7 @@
import React, { useState } from 'react';
import PropTypes from 'prop-types';
function LayoutSelector({ onSelection, rows, columns }) {
function LayoutSelector({ onSelection = () => {}, rows = 3, columns = 4 }) {
const [hoveredIndex, setHoveredIndex] = useState();
const hoverX = hoveredIndex % columns;
const hoverY = Math.floor(hoveredIndex / columns);
@@ -48,12 +48,6 @@ function LayoutSelector({ onSelection, rows, columns }) {
);
}
LayoutSelector.defaultProps = {
onSelection: () => {},
columns: 4,
rows: 3,
};
LayoutSelector.propTypes = {
onSelection: PropTypes.func.isRequired,
columns: PropTypes.number.isRequired,