import 'package:flutter/material.dart';
import 'package:rkm/config/color_palette.dart';

import '../config/const_variable.dart';
class ButtonDefault extends StatelessWidget {
  var onPressed;
  String title;
  Color background;
  Color disableColor;
  Color textColor;
  Color borderColor;
  double width;
  double height;

  ButtonDefault({
    required this.onPressed,
    required this.title,
    this.background = Colors.transparent,
    this.textColor = ColorPalette.border,
    this.borderColor = ColorPalette.border,
    this.disableColor = ColorPalette.border,
    this.width = 100,
    this.height = 50,
});

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: ConstVariable().marginHightInput,
      width: width,
      height: height,
      child: TextButton(
          onPressed: onPressed,
          style: TextButton.styleFrom(
            backgroundColor:  background,
            disabledBackgroundColor: disableColor,
            foregroundColor:  textColor,
            side: BorderSide(width: 3,color: borderColor),
          ),
          child: Text(
            title,
            style: TextStyle(
              fontSize: ConstVariable().fontSizeInput
            ),
          )
      ),
    );
  }
}
