package com.develop.food.base.adapter

import android.widget.TextView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.develop.base.R


class CookTimeAdapter(data: MutableList<String>, var color: Int? = null): BaseQuickAdapter<String, BaseViewHolder>(
    R.layout.item_cook_time, data
) {
    override fun convert(holder: BaseViewHolder, item: String) {
        val tvTime = holder.getView<TextView>(R.id.tv_time)
        color?.apply {
            tvTime.setTextColor(this)
        }
        tvTime.text = item
    }
}