Remove unused components and models for improved maintainability
- Deleted redundant components (`AddActionButton`, `AlertBox`, `AlertStack`, `BackButton`, `CancelButton`, and `CollapsableArea`) and related files. - Removed unused models (`Book`, `BookSerie`, `BookTables`, `Character`, and `Chapter`) to reduce codebase clutter. - Updated project structure and references to reflect these removals.
This commit is contained in:
@@ -1,4 +1,12 @@
|
||||
import {ChangeEvent} from "react";
|
||||
import React, {ChangeEvent} from "react";
|
||||
|
||||
type InputSize = 'sm' | 'md' | 'lg';
|
||||
|
||||
const sizeClasses: Record<InputSize, string> = {
|
||||
sm: 'px-3 py-1.5 text-xs rounded-lg',
|
||||
md: 'px-4 py-2.5 text-sm rounded-xl',
|
||||
lg: 'px-5 py-3 text-base rounded-xl',
|
||||
};
|
||||
|
||||
interface TextInputProps {
|
||||
value: string;
|
||||
@@ -7,6 +15,7 @@ interface TextInputProps {
|
||||
readOnly?: boolean;
|
||||
disabled?: boolean;
|
||||
onFocus?: () => void;
|
||||
size?: InputSize;
|
||||
}
|
||||
|
||||
export default function TextInput(
|
||||
@@ -16,7 +25,8 @@ export default function TextInput(
|
||||
placeholder,
|
||||
readOnly = false,
|
||||
disabled = false,
|
||||
onFocus
|
||||
onFocus,
|
||||
size = 'md'
|
||||
}: TextInputProps) {
|
||||
return (
|
||||
<input
|
||||
@@ -27,13 +37,7 @@ export default function TextInput(
|
||||
disabled={disabled}
|
||||
placeholder={placeholder}
|
||||
onFocus={onFocus}
|
||||
className={`w-full bg-secondary/50 text-text-primary px-4 py-2.5 rounded-xl border border-secondary/50
|
||||
focus:border-primary focus:ring-4 focus:ring-primary/20 focus:bg-secondary
|
||||
hover:bg-secondary hover:border-secondary
|
||||
placeholder:text-muted/60
|
||||
outline-none transition-all duration-200
|
||||
${disabled ? 'opacity-50 cursor-not-allowed' : ''}
|
||||
${readOnly ? 'cursor-default' : ''}`}
|
||||
className={`input-base ${sizeClasses[size]}`}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user