Are you first timer at Why not join us and start exchange your programming knowledge with everyone. Register today!

React - inline styling

0 votes
added Mar 8 in React by LC Marshal Captain (20,510 points)
import React from 'react';

const containerStyle = {
  padding: '20px',
  border: '5px solid #000'
const contentStyle = {
  fontSize: '15px',
  textAlign: 'center'

const MainPage = () => (
  <div style={containerStyle}>
    <div style={contentStyle}>Content goes here</div>

export default MainPage;


Please log in or register to response this reference. - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.