| 1 |
import { __ } from '@wordpress/i18n'; |
| 2 |
import { useBlockProps } from '@wordpress/block-editor'; |
| 3 |
|
| 4 |
const Edit = ( props ) => { |
| 5 |
const { attributes, setAttributes, context } = props; |
| 6 |
const blockProps = useBlockProps(); |
| 7 |
return ( |
| 8 |
<> |
| 9 |
<div { ...blockProps }> |
| 10 |
<div class="course-material"> |
| 11 |
<h3 class="course-material__title">{ __( 'Course Material', 'learnpress' ) }</h3> |
| 12 |
<div class="lp-list-material"> |
| 13 |
<div class="lp-material-skeleton"> |
| 14 |
<table class="course-material-table"> |
| 15 |
<thead> |
| 16 |
<tr> |
| 17 |
<th class="lp-material-th-file-name">{ __( 'Name', 'learnpress' ) }</th> |
| 18 |
<th class="lp-material-th-file-type">{ __( 'Type', 'learnpress' ) }</th> |
| 19 |
<th class="lp-material-th-file-size">{ __( 'Size', 'learnpress' ) }</th> |
| 20 |
<th class="lp-material-th-file-link">{ __( 'Download', 'learnpress' ) }</th> |
| 21 |
</tr> |
| 22 |
</thead> |
| 23 |
<tbody id="material-file-list"> |
| 24 |
<tr class="lp-material-item"> |
| 25 |
<td class="lp-material-file-name">Course Materials</td> |
| 26 |
<td class="lp-material-file-type">txt</td> |
| 27 |
<td class="lp-material-file-size">1KB</td> |
| 28 |
<td class="lp-material-file-link"> |
| 29 |
<a> |
| 30 |
<i class="lp-icon-file-download btn-download-material"></i> |
| 31 |
</a> |
| 32 |
</td> |
| 33 |
</tr> |
| 34 |
</tbody> |
| 35 |
</table> |
| 36 |
<button class="lp-button lp-loadmore-material"> |
| 37 |
{ __( 'Load more', 'learnpress' ) } |
| 38 |
</button> |
| 39 |
</div> |
| 40 |
</div> |
| 41 |
</div> |
| 42 |
</div> |
| 43 |
</> |
| 44 |
); |
| 45 |
}; |
| 46 |
|
| 47 |
export default Edit; |
| 48 |
|