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

React - inline styling

0 votes
20 views
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>
  </div>
);

export default MainPage;

 

Please log in or register to response this reference.

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...