Skip to content
Snippets Groups Projects
Commit a73217fd authored by Felipe D'Abrantes's avatar Felipe D'Abrantes
Browse files

Define minimum widths and heights

parent bcaf4e28
No related branches found
No related tags found
1 merge request!25Add a question management page
...@@ -11,15 +11,12 @@ type QuestionListProps = { ...@@ -11,15 +11,12 @@ type QuestionListProps = {
const QuestionList: FC<QuestionListProps> = ({ questions, onDeleteClick }) => ( const QuestionList: FC<QuestionListProps> = ({ questions, onDeleteClick }) => (
<ul <ul
role="list" role="list"
className={ className={`flex flex-col min-h-min max-w-lg overflow-y-scroll divide-y divide-gray-100 mt-4 min-w-[24rem] ${styles['scrollbox-shadows']}`}
'flex flex-col min-h-min max-w-lg overflow-y-scroll divide-y divide-gray-100 mt-4 ' +
styles['scrollbox-shadows']
}
> >
{questions.map((question: QuestionRecord) => ( {questions.map((question: QuestionRecord) => (
<li <li
key={question.id} key={question.id}
className="flex flex-row items-center justify-between gap-x-6 py-5 px-4 " className="flex flex-row items-center justify-between gap-x-6 py-5 px-4"
> >
<p className="text-base font-semibold leading-6 text-gray-900">{question.content}</p> <p className="text-base font-semibold leading-6 text-gray-900">{question.content}</p>
<TrashIcon className="shrink-0 h-6 w-6 cursor-pointer" type='button' onClick={() => onDeleteClick(question.id)} /> <TrashIcon className="shrink-0 h-6 w-6 cursor-pointer" type='button' onClick={() => onDeleteClick(question.id)} />
......
...@@ -67,6 +67,7 @@ const Questions = () => { ...@@ -67,6 +67,7 @@ const Questions = () => {
const onQuestionDelete = async (questionId: string): Promise<void> => { const onQuestionDelete = async (questionId: string): Promise<void> => {
await deleteQuestion(questionId); await deleteQuestion(questionId);
setStatusMessage(undefined);
setRehydrateQuestions(true); setRehydrateQuestions(true);
}; };
...@@ -86,7 +87,7 @@ const Questions = () => { ...@@ -86,7 +87,7 @@ const Questions = () => {
/> />
{/* List of Questions */} {/* List of Questions */}
<div className="flex flex-col items-center w-full shadow-lg min-h-32 pb-4 overflow-auto"> <div className="flex flex-col items-center w-full shadow-lg h-full pb-4 overflow-auto">
<h2 className="text-xl font-semibold leading-10 pt-4 text-gray-900">Questions Stored</h2> <h2 className="text-xl font-semibold leading-10 pt-4 text-gray-900">Questions Stored</h2>
{questions === undefined ? <p>Loading</p> : <QuestionList questions={questions} onDeleteClick={onQuestionDelete}/>} {questions === undefined ? <p>Loading</p> : <QuestionList questions={questions} onDeleteClick={onQuestionDelete}/>}
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment