import 'package:didvan/config/design_config.dart';
import 'package:didvan/config/theme_data.dart';
import 'package:didvan/views/widgets/didvan/text.dart';
import 'package:didvan/views/widgets/ink_wrapper.dart';
import 'package:flutter/material.dart';

class DidvanChip extends StatelessWidget {
  final String label;
  final VoidCallback? onTap;
  const DidvanChip({
    Key? key,
    required this.label,
    this.onTap,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return InkWrapper(
      borderRadius: DesignConfig.highBorderRadius,
      onPressed: onTap,
      child: Container(
        padding: const EdgeInsets.symmetric(vertical: 2, horizontal: 8),
        decoration: BoxDecoration(
          borderRadius: DesignConfig.highBorderRadius,
          color: Theme.of(context).colorScheme.primary,
        ),
        child: DidvanText(
          label,
          style: Theme.of(context).textTheme.bodySmall,
          color: Theme.of(context).colorScheme.white,
        ),
      ),
    );
  }
}
