Team Ai
Apppublic

Decoder2704/python-chatbot-jay

sourceHugging Faceupdated 7mo agoView on Hugging Face
0likes
SampleQuestions.jsx32 linesDownload Raw Back to components
1import "./SampleQuestions.css";2 3const SAMPLES = [4  "What is list comprehension in Python?",5  "How does a Python decorator work?",6  "What is the difference between `is` and `==` in Python?",7  "Explain Python's Global Interpreter Lock (GIL).",8  "How do you handle exceptions in Python?",9];10 11export default function SampleQuestions({ onSelect, disabled }) {12  return (13    <div className="sample-questions">14      <p className="sample-questions__title">Try a sample question</p>15      <ul className="sample-questions__list">16        {SAMPLES.map((q) => (17          <li key={q}>18            <button19              type="button"20              className="sample-questions__chip"21              disabled={disabled}22              onClick={() => onSelect(q)}23            >24              {q}25            </button>26          </li>27        ))}28      </ul>29    </div>30  );31}32