import 'package:flutter/material.dart';


class PasswordErrorText extends StatelessWidget {
  const PasswordErrorText({
    super.key,
    required this.errorText,
    required this.gapSmall,
  });

  final String errorText;
  final double gapSmall;

  @override
  Widget build(BuildContext context) {
    if (errorText.isEmpty) return const SizedBox.shrink();

    final theme = Theme.of(context);

    return Column(
      children: [
        SizedBox(height: gapSmall),
        Text(
          errorText,
          style: theme.textTheme.bodySmall?.copyWith(
            color: theme.colorScheme.error,
          ),
        ),
      ],
    );
  }
}
