<view
    class="worksheet-card"
    hover-class="worksheet-card--active"
    hover-stay-time="100"
    bindtap="onTap"
>
    <view class="worksheet-card__preview" style="background-color: {{previewBg}}">
        <image
            wx:if="{{img}}"
            class="worksheet-card__img"
            src="{{img}}"
            mode="aspectFill"
        />
        <text wx:else class="worksheet-card__preview-text">{{previewText}}</text>
    </view>
    <view class="worksheet-card__title">{{title}}</view>
    <view class="worksheet-card__tags">
        <view wx:if="{{ageRange}}" class="worksheet-card__tag worksheet-card__tag--age">{{ageRange}}</view>
        <view wx:if="{{difficulty}}" class="worksheet-card__tag worksheet-card__tag--diff">{{difficulty}}</view>
    </view>
</view>
