JSFiddle - React, Tailwind, and code Playground

by David Kyle

HTML

<div class="liner">
  <section class="content">
    <h1>
      Content
    </h1>
    <p>
    Information about this page.
    </p>
  </section>
  <section class="ads"></section>
</div>

CSS

.liner {
  padding: .4rem;
  margin: 1rem;
  border-radius: .2rem;
  border: solid 1px rgba(40, 40, 40, .5);
  background-color: #efefef;
  width: 50%;
  min-height: 40px;
}

JavaScript

let Page = (function() {
	let myName = 'Dave';
  
  let utilities = (function() {
  	let self = {};
    self.ShowAlert = function(message) {
    	window.alert(message);
    }
    
    return self;
  })();
  
  return {
  	getName: function() {
   		return myName;
    },
    Utilities: utilities
  }
})();

console.log(Page.Utilities.ShowAlert("Hello there friend"));