File size: 857 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
import React, { Component } from 'react';
import { ThemeContext } from './context/ThemeContexts';
class Title extends Component {
static contextType = ThemeContext;
render() {
const { theme } = this.context;
const { name, title } = this.props;
return (
<div className="row">
<div className="col-10 mx-auto my-2 text-center text-title">
<h1
className={
theme
? 'text-capitalize font-weight-bold text-light'
: 'text-capitalize font-weight-bold text-dark'
}
>
{name}{' '}
<strong
className={
theme ? 'text-primary' : 'text-blue'
}
>
{title}
</strong>
</h1>
</div>
</div>
);
}
}
export default Title;
|