I have a parent component sending the values for lightning card one by one to the child component. The child component contains the lightning card. I want to display 3 cards in one row but all the cards are getting displayed on one row itself. Below is my code.
Parent component:
<div class="slds-grid slds-wrap">
<template for:each={reportMessage} for:item="summaryField">
<div key={summaryField.fieldName}>
<c-q-r-report-summary-item title={summaryField.fieldName} value={summaryField.totalRecords}></c-q-r-report-summary-item>
</div>
</template>
</div>
Child Component:
<template>
<div class="slds-grid slds-wrap slds-col slds-size_1-of-3 slds-p-horizontal_x-small slds-p-vertical_x-small">
<div class="cardShadow">
<lightning-card>
<div slot="title" class="slds-align_absolute-center slds-border_bottom slds-text-heading_medium">
{title}
</div>
<p class="slds-p-horizontal_small slds-align_absolute-center slds-text-heading_large ">{value}</p>
</lightning-card>
</div>
</div>
</template>