JSFiddle - React, Tailwind, and code Playground

HTML

<div class="fileDetails">
    <p class="filename">text goes here</p>
    <p class="fileSize">text goes here</p>
</div>

JavaScript

// if container doesn't lready exist
if ( !$('.container').length ) {
    // then create it and wrap fileDetails in it
    $('.fileDetails').wrap('<div class="container" />')
}