import 'package:flutter/material.dart';

class CustomTextButton extends StatelessWidget{

  final onPressed;
  final String text;
  final double size;
  final FontWeight weight;
  final Color? color;

  @override
  const CustomTextButton({
    super.key,
    required this.onPressed,
    required this.text,
    this.size = 14,
    this.weight = FontWeight.normal,
    this.color
  });

  @override
  Widget build(BuildContext context) {
    
    return TextButton(
      style: ButtonStyle(padding: WidgetStatePropertyAll(EdgeInsets.zero)),
      onPressed: onPressed,
      child: Text(
        text,
        style: TextStyle(
          fontSize: size,
          fontWeight: weight,
          letterSpacing: 0,
          color: color?? Color(0xFF4B4B4B),
          decoration: TextDecoration.underline
        ),
      )
    );
  }
}