import 'package:flutter/material.dart';
import '../../wisdom_cli.dart';

class WFilterButtons extends StatelessWidget {
  final double? width;
  final double? height;
  final double? spacing;
  final double? runspacing;
  final double? bRadius;
  final Widget child;
  final String? name;

  const WFilterButtons({
    Key? key,
    this.width,
    this.height,
    this.spacing,
    this.runspacing,
    this.bRadius,
    this.name,
    required this.child,
  });

  @override
  Widget build(BuildContext context) {
    return Wisdom.column(
      crossAxisAlignment: CrossAxisAlignment.stretch,
      children: [
        WisText(
          '${name ?? ''}',
          size: 16.pt,
          weight: FontWeight.bold,
        ).asPaddingSymmetric(vertical: 8.pt),
        ButtonTheme(
          minWidth: width ?? 100.pt,
          height: height ?? 39.pt,
          textTheme: ButtonTextTheme.accent,
          shape: RoundedRectangleBorder(
            borderRadius: BorderRadius.circular(15.pt),
          ),
          child: child,
        ),
      ],
    );
  }
}
