change name logind all component

This commit is contained in:
hamid zarghami
2025-11-23 08:39:30 +03:30
parent 9eadbb568b
commit 42960e581a
32 changed files with 526 additions and 47 deletions
+3 -3
View File
@@ -5,7 +5,7 @@ import { clx } from '../helpers/utils'
type Props = {
className?: string;
isLoading?: boolean,
isloading?: boolean,
} & ButtonHTMLAttributes<HTMLButtonElement> &
XOR<{ children: ReactNode }, { label: string }>;
@@ -18,9 +18,9 @@ const Button: FC<Props> = memo((props: Props) => {
);
return (
<button disabled={props.isLoading} {...props} className={`${buttonClass} ${props.className}`} >
<button disabled={props.isloading} {...props} className={`${buttonClass} ${props.className}`} >
{
props.isLoading ?
props.isloading ?
<MoonLoader color="white" size={16} />
:
props.label || props.children
+2 -2
View File
@@ -5,7 +5,7 @@ import Button from './Button'
import Textarea from './Textarea'
type Props = {
isLoading?: boolean,
isloading?: boolean,
close: () => void,
isOpen: boolean,
onConfrim: (text?: string) => void,
@@ -51,7 +51,7 @@ const ModalConfrim: FC<Props> = (props: Props) => {
<Button
label={t('confrim.yes')}
onClick={() => props.onConfrim(props.isHasDescription ? description : undefined)}
isLoading={props.isLoading}
isloading={props.isloading}
/>
<Button
label={t('confrim.cancel')}
+3 -3
View File
@@ -9,7 +9,7 @@ import Pagination from '../components/Pagination';
const Table = <T extends RowDataType>({
columns,
data,
isLoading = false,
isloading = false,
onRowClick,
className = '',
rowClassName = '',
@@ -74,7 +74,7 @@ const Table = <T extends RowDataType>({
const hasActions = (actionsPosition === 'top' || actionsPosition === 'above-header') && (actions || (selectable && selectedRows.length > 0 && selectedActions));
const roundedClass = hasActions ? 'rounded-b-2xl' : 'rounded-2xl';
if (isLoading) {
if (isloading) {
return (
<div className={`bg-white ${roundedClass} overflow-hidden`}>
{Array.from({ length: emptyRowsCount }).map((_, index) => (
@@ -145,7 +145,7 @@ const Table = <T extends RowDataType>({
};
const renderTableBody = () => {
if (isLoading) {
if (isloading) {
return (
<DefaultTableSkeleton tdCount={columns.length + (selectable ? 1 : 0) + (rowActions ? 1 : 0)} trCount={emptyRowsCount} />
);
+3 -3
View File
@@ -4,10 +4,10 @@ import ModalConfrim from './ModalConfrim'
interface Props {
onDelete: () => void,
isLoading?: boolean
isloading?: boolean
}
const TrashWithConfrim: FC<Props> = ({ onDelete, isLoading = false }) => {
const TrashWithConfrim: FC<Props> = ({ onDelete, isloading = false }) => {
const [isConfirm, setIsConfirm] = useState(false)
return (
<div>
@@ -21,7 +21,7 @@ const TrashWithConfrim: FC<Props> = ({ onDelete, isLoading = false }) => {
isOpen={isConfirm}
close={() => setIsConfirm(false)}
onConfrim={() => onDelete()}
isLoading={isLoading}
isloading={isloading}
/>
</div>
)
+1 -1
View File
@@ -29,7 +29,7 @@ export interface ActionType {
export interface TableProps<T extends RowDataType> {
columns: ColumnType<T>[];
data?: T[];
isLoading?: boolean;
isloading?: boolean;
onRowClick?: (id: string | number, item: T) => void;
className?: string;
rowClassName?: string | ((item: T, index: number) => string);