[questions][ui] add vertical scrolling

pull/346/head
Jeff Sieu 3 years ago committed by wlren
parent 41046b4720
commit 9658c95523

@ -175,7 +175,7 @@ export default function AppShell({ children }: Props) {
/> />
{/* Content area */} {/* Content area */}
<div className="flex flex-1 flex-col overflow-hidden"> <div className="flex h-screen flex-1 flex-col overflow-hidden">
<header className="w-full"> <header className="w-full">
<div className="relative z-10 flex h-16 flex-shrink-0 border-b border-gray-200 bg-white shadow-sm"> <div className="relative z-10 flex h-16 flex-shrink-0 border-b border-gray-200 bg-white shadow-sm">
<button <button

@ -22,7 +22,7 @@ export default function ContributeQuestionCard() {
return ( return (
<> <>
<div className="flex flex-col items-stretch justify-center gap-2 rounded-md border border-slate-300 p-4"> <div className="flex flex-col items-stretch justify-center gap-2 rounded-md border border-slate-300 bg-white p-4">
<TextInput <TextInput
isLabelHidden={true} isLabelHidden={true}
label="Question" label="Question"

@ -63,7 +63,7 @@ export default function QuestionCard({
location, location,
}: QuestionCardProps) { }: QuestionCardProps) {
return ( return (
<article className="flex gap-2 rounded-md border border-slate-300 p-4"> <article className="flex gap-4 rounded-md border border-slate-300 p-4 bg-white">
{showVoteButtons && ( {showVoteButtons && (
<div className="flex flex-col items-center"> <div className="flex flex-col items-center">
<Button <Button

@ -134,7 +134,7 @@ export default function QuestionsHomePage() {
) : ( ) : (
<main className="flex flex-1 flex-col items-stretch overflow-y-auto"> <main className="flex flex-1 flex-col items-stretch overflow-y-auto">
<div className="flex pt-4"> <div className="flex pt-4">
<section className="w-[300px] border-r px-4"> <aside className="w-[300px] border-r px-4">
<h2 className="text-xl font-semibold">Filter by</h2> <h2 className="text-xl font-semibold">Filter by</h2>
<div className="divide-y divide-slate-200"> <div className="divide-y divide-slate-200">
<FilterSection <FilterSection
@ -189,9 +189,9 @@ export default function QuestionsHomePage() {
}} }}
/> />
</div> </div>
</section> </aside>
<div className="flex flex-1 justify-center"> <section className="flex min-h-0 flex-1 flex-col items-center overflow-auto pt-4">
<div className="flex max-w-3xl flex-1 gap-x-4"> <div className="flex min-h-0 max-w-3xl flex-1 gap-x-4">
<div className="flex flex-1 flex-col items-stretch justify-start gap-4"> <div className="flex flex-1 flex-col items-stretch justify-start gap-4">
<ContributeQuestionCard /> <ContributeQuestionCard />
<QuestionSearchBar <QuestionSearchBar
@ -207,18 +207,22 @@ export default function QuestionsHomePage() {
]} ]}
sortValue="most-recent" sortValue="most-recent"
/> />
<QuestionOverviewCard {Array.from({ length: 10 }).map((_, index) => (
answerCount={0} <QuestionOverviewCard
content="Given an array of integers nums and an integer target, return indices of the two numbers such that they add up. Given an array of integers nums and an integer target, return indices of the two numbers such that they add up. Given an array of integers nums and" // eslint-disable-next-line react/no-array-index-key
location="Menlo Park, CA" key={index}
role="Senior Engineering Manager" answerCount={0}
similarCount={0} content="Given an array of integers nums and an integer target, return indices of the two numbers such that they add up. Given an array of integers nums and an integer target, return indices of the two numbers such that they add up. Given an array of integers nums and"
timestamp="Last month" location="Menlo Park, CA"
upvoteCount={0} role="Senior Engineering Manager"
/> similarCount={0}
timestamp="Last month"
upvoteCount={0}
/>
))}
</div> </div>
</div> </div>
</div> </section>
</div> </div>
</main> </main>
); );

Loading…
Cancel
Save