import React, { Component } from "react";
import { StyleSheet, Text, View } from "react-native";

import { czcionka, wspolczynnikiSkalowania } from "../style/czcionka";
import Dimensions from "Dimensions";
let { width } = Dimensions.get("window");

class TekstNaglowka extends Component {
  static displayName = "TekstNaglowka";

  render() {
    return (
      <Text style={[this.props.style, czcionka.duza, skalowanie.duzy]}>
        {this.props.children}
      </Text>
    );
  }
}

const skalowanie = StyleSheet.create({
  duzy: { fontSize: width / wspolczynnikiSkalowania.duzy }
});

export default TekstNaglowka;
