import 'package:component_library/component_library.dart';
import 'package:flutter/material.dart';

class ErrorMessageBuilder extends StatelessWidget {
  const ErrorMessageBuilder({
    Key? key,
    required this.inputLabel,
    required this.messageError,
  }) : super(key: key);

  /// input label ditampilkan title ketika error
  final String inputLabel;
  /// pesan error yang ditampilkan
  final String messageError;

  @override
  Widget build(BuildContext context) {
    final theme = GolekTheme.of(context);

    return Text(
      messageError,
      style: theme.textStyle.copyWith(
        fontSize: FontSize.style12,
        color: theme.dangerMainColor,
      ),
    );
  }
}