import 'package:flutter/material.dart';
import 'package:syncrow_web/utils/color_manager.dart';
import 'package:syncrow_web/utils/extension/build_context_x.dart';

class ValueDisplay extends StatelessWidget {
  final dynamic value;
  final String label;
  final String unit;

  const ValueDisplay({
    required this.value,
    required this.label,
    super.key,
    required this.unit,
  });

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10),
      decoration: BoxDecoration(
        color: ColorsManager.primaryColorWithOpacity.withOpacity(0.1),
        borderRadius: BorderRadius.circular(10),
      ),
      child: Text(
        '$label $unit ',
        style: context.textTheme.headlineMedium!.copyWith(
          color: ColorsManager.primaryColorWithOpacity,
        ),
      ),
    );
  }
}
