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

class SubspaceChipWidget extends StatelessWidget {
  final String subspace;

  const SubspaceChipWidget({
    Key? key,
    required this.subspace,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
      decoration: BoxDecoration(
        color: ColorsManager.textFieldGreyColor,
        borderRadius: BorderRadius.circular(8),
        border: Border.all(
          color: ColorsManager.transparentColor,
          width: 0,
        ),
      ),
      child: Text(
        subspace,
        overflow: TextOverflow.ellipsis,
        maxLines: 1,
        style: Theme.of(context)
            .textTheme
            .bodySmall
            ?.copyWith(color: ColorsManager.spaceColor),
      ),
    );
  }
}
