import 'package:ambito/src/extensions/extensions.dart';
import 'package:flutter/material.dart';

import '../../packages/ambito_theme/ambito_theme.dart';

class TextHeadline extends StatelessWidget {
  const TextHeadline({super.key, required this.text});

  final String text;

  @override
  Widget build(BuildContext context) {
    final AmbitoTheme theme = getTheme(context);

    return Text(
      context.translate(text),
      style: theme.headlineMedium.copyWith(
        color: theme.currentColorScheme.onSurface,
      ),
    );
  }
}
