I am currently exploring the possibility of creating a versatile component that can be customized based on the needs of its parent element, whether through bootstrap or traditional flexbox / CSS grid. I want to determine the level of reusability this component would offer.
Specifically, I have designed a component that includes an image and text, and I am looking to reuse it while leveraging the functionalities provided by bootstrap utilities.
Example Code:
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet" />
<div class="row no-gutters text-white dy-fixed-height-content mt-4">
<div class="col-lg-6">
<div class="bg-dark p2 flex-fill">
<div class="card__image"><img src="https://placeimg.com/640/480/any"></div>
<div class="card__title">
<a target="_blank" href="" class="card__title--link">Big item here</a>
</div>
</div>
</div>
<div class="col-lg-6">
<div class="d-inline-flex flex-wrap flex-fill align-content-stretch">
<div class="bg-dark p2 flex-fill">
<div class="card__image"><img src="https://placeimg.com/640/480/any"></div>
<div class="card__title">
<a target="_blank" href="" class="card__title--link">Small item here</a>
</div>
</div>
<!-- Additional card components go here -->
</div>
</div>
</div>
My Goal: