refactor: extract reusable library
- move reusable domain, data, state, ui code into src/lib - update host screens to consume new library exports - document architecture and configure path aliases - bump astro integration dependencies for compatibility Refs #30
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
import { h } from 'preact';
|
||||
import styles from './Modal.module.css';
|
||||
|
||||
interface ValidationModalProps {
|
||||
open: boolean;
|
||||
message: string;
|
||||
onClose: () => void;
|
||||
}
|
||||
|
||||
/**
|
||||
* Modal for displaying validation errors.
|
||||
*/
|
||||
const ValidationModal = ({ open, message, onClose }: ValidationModalProps) => {
|
||||
if (!open) return null;
|
||||
return (
|
||||
<div className={styles['modal'] + ' ' + styles['show']} id="validation-modal" role="alertdialog" aria-modal="true" aria-labelledby="validation-modal-title">
|
||||
<div className={styles['modal-content']}>
|
||||
<div className={styles['modal-header']}>
|
||||
<span className={styles['modal-title']} id="validation-modal-title">Fehler</span>
|
||||
<button className={styles['close-button']} onClick={onClose} aria-label="Schließen">×</button>
|
||||
</div>
|
||||
<div className={styles['modal-body']}>
|
||||
<div className={styles['modal-message']}>{message}</div>
|
||||
</div>
|
||||
<div className={styles['modal-footer']}>
|
||||
<button className={styles['modal-button'] + ' ' + styles['cancel']} onClick={onClose} aria-label="OK">OK</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default ValidationModal;
|
||||
Reference in New Issue
Block a user