space-game/src/components/shared/FormGroup.svelte
Michael Mainguy eccf101b73
All checks were successful
Build / build (push) Successful in 1m20s
Implement Svelte-based UI architecture with component system
Major refactoring of the UI layer to use Svelte components:
- Replace inline HTML with modular Svelte components
- Add authentication system with UserProfile component
- Implement navigation store for view management
- Create comprehensive settings and controls screens
- Add level editor with JSON validation
- Implement progression tracking system
- Update level configurations and base station model

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-21 15:01:17 -06:00

32 lines
626 B
Svelte

<script lang="ts">
export let label: string = '';
export let helpText: string = '';
export let error: string = '';
export let htmlFor: string = '';
</script>
<div class="form-group">
{#if label}
<label for={htmlFor}>{label}</label>
{/if}
<slot />
{#if helpText && !error}
<div class="help-text">{helpText}</div>
{/if}
{#if error}
<div class="error-text">{error}</div>
{/if}
</div>
<style>
/* Inherits from global styles.css */
.error-text {
color: var(--color-danger, #ff4444);
font-size: var(--font-size-sm, 0.875rem);
margin-top: var(--space-xs, 0.25rem);
}
</style>