import 'package:flutter/material.dart';

import '../../core/theme/colors.dart';
import '../../core/utils/size_config.dart';

class TabItem extends StatelessWidget {
  const TabItem({
    required this.title,
    required this.isActive,
    required this.onTap,
    super.key,
  });

  final String title;
  final bool isActive;
  final VoidCallback onTap;

  @override
  Widget build(BuildContext context) {
    return InkWell(
      onTap: onTap,
      child: Tab(
        child: SizedBox(
          width: 170.0.w(),
          child: Center(
            child: Text(
              title,
              style: TextStyle(
                fontSize: 16.0.sp(),
                fontWeight: FontWeight.w600,
                color: isActive ? AppColors.mainBlue : AppColors.grey60,
              ),
            ),
          ),
        ),
      ),
    );
  }
}
