-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Safari bug for results page (#19)
- Loading branch information
Showing
24 changed files
with
2,794 additions
and
2,345 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import classNames from 'classnames' | ||
import { Disclosure } from '@headlessui/react' | ||
import { ChevronDownIcon } from '@heroicons/react/24/outline' | ||
import React from 'react' | ||
|
||
type Props = { | ||
title: string | ||
children: React.ReactNode | ||
no?: number | ||
} | ||
|
||
export const DisclosureListItem: React.FC<Props> = ({ | ||
title, | ||
children, | ||
no, | ||
}) => { | ||
return ( | ||
<Disclosure as="div" key={title} className="pt-6"> | ||
{({ open }) => ( | ||
<> | ||
<dt className="text-lg"> | ||
<Disclosure.Button className="flex w-full items-start justify-between text-left text-gray-400 gap-2"> | ||
<div className="flex gap-6 items-center"> | ||
{no && ( | ||
<span className="flex h-10 w-10 flex-none items-center justify-center rounded-full bg-rs8-pink pt-1 text-white shadow-lg"> | ||
{no} | ||
</span> | ||
)} | ||
<span className="font-medium text-gray-900">{title}</span> | ||
</div> | ||
<span className="flex h-7 items-center"> | ||
<ChevronDownIcon | ||
className={classNames( | ||
open ? '-rotate-180' : 'rotate-0', | ||
'h-6 w-6 transform', | ||
)} | ||
aria-hidden="true" | ||
/> | ||
</span> | ||
</Disclosure.Button> | ||
</dt> | ||
<Disclosure.Panel | ||
as="dd" | ||
className={classNames( | ||
'mt-3 lg:pr-12 prose', | ||
'text-gray-500', | ||
'prose-strong:text-gray-500', | ||
'max-w-full', | ||
'prose-div:max-w-full', | ||
'text-sm md:text-[16px]', | ||
'prose-h1:text-base md:prose-h1:text-lg', // h1 size | ||
'prose-h2:text-sm md:prose-h2:text-[16px]', // h2 size | ||
'prose-h3:text-sm md:prose-h3:text-[16px]', // h3 size | ||
'leading-normal md:leading-normal prose-p:leading-normal md:prose-p:leading-normal prose-li:leading-relaxed md:prose-li:leading-relaxed', | ||
'prose-ul:list-disc prose-ul:my-6 prose-li:text-gray-500 prose-ul:ml-4', | ||
)} | ||
> | ||
{children} | ||
</Disclosure.Panel> | ||
</> | ||
)} | ||
</Disclosure> | ||
) | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,30 @@ | ||
import React from 'react' | ||
import { FAQ, FAQItem } from '../FAQ' | ||
|
||
import { DisclosureList } from '../Disclosure/DisclosureList' | ||
import { DisclosureListItem } from '../Disclosure/DisclosureListItem' | ||
import { H2 } from '../Text' | ||
import { categoizedFaqs } from './categoizedFaqs.const' | ||
import { Section } from '../Layout' | ||
|
||
export const PageFaqFaqs: React.FC = () => { | ||
return ( | ||
<div className="mb-10 md:mb-36"> | ||
<Section> | ||
{Object.entries(categoizedFaqs).map(([categoryTitle, categoryFaqs]) => { | ||
return ( | ||
<section className="m-auto mb-24"> | ||
<h2 className="text-sky-700">{categoryTitle}</h2> | ||
<FAQ> | ||
<section key={categoryTitle} className="m-auto mb-24"> | ||
<H2>{categoryTitle}</H2> | ||
<DisclosureList> | ||
{Object.entries(categoryFaqs).map(([faqTitle, faqBody]) => { | ||
return <FAQItem title={faqTitle}>{faqBody}</FAQItem> | ||
return ( | ||
<DisclosureListItem key={faqTitle} title={faqTitle}> | ||
{faqBody} | ||
</DisclosureListItem> | ||
) | ||
})} | ||
</FAQ> | ||
</DisclosureList> | ||
</section> | ||
) | ||
})} | ||
</div> | ||
</Section> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,31 @@ | ||
import React from 'react' | ||
|
||
import { DisclosureList } from '~/components/Disclosure/DisclosureList' | ||
import { DisclosureListItem } from '~/components/Disclosure/DisclosureListItem' | ||
import { H3 } from '~/components/Text' | ||
import { TSectionDetails } from '../data.const/types' | ||
import { SectionDetailsItem } from './SectionDetailsItem' | ||
|
||
type Props = { | ||
details: TSectionDetails[] | ||
} | ||
|
||
export const SectionDetails: React.FC<Props> = ({ details }) => { | ||
return ( | ||
<div className="m-auto mb-20 space-y-6 divide-y divide-white border-y bg-gray-200 px-6 pb-6 md:mx-10 md:px-10"> | ||
<h3 className="mb-8 mt-14 text-center text-[32px] font-bold text-sky-700"> | ||
Detailinfos | ||
</h3> | ||
{details.map((detail) => { | ||
return <SectionDetailsItem detail={detail} /> | ||
})} | ||
<div> | ||
<H3>Detailinfos</H3> | ||
<DisclosureList> | ||
{details.map((detail) => { | ||
return ( | ||
<DisclosureListItem | ||
key={detail.no} | ||
no={detail.no} | ||
title={detail.title} | ||
> | ||
<div>{detail.body}</div> | ||
</DisclosureListItem> | ||
) | ||
})} | ||
</DisclosureList> | ||
</div> | ||
) | ||
} |
Oops, something went wrong.