-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
General style and component refactor #96
Merged
Merged
Changes from 8 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
3ddf2a9
add dark mode and refactor wfr details page
raylrui 73e54cf
merge to main
raylrui f948728
merge to main
raylrui 8a333b9
fix theme and payload detail issue
raylrui b222e37
dialog upgrade and runs side bar build
raylrui 08682df
add improvement for dialog and sidebar
raylrui 2ed7933
fix type error
raylrui b4c1c6a
merge to main
raylrui ae73870
add sequence status api and fix error
raylrui 7615923
upgrade style from comment
raylrui 0cadfc6
merge to main
raylrui File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import { Disclosure, DisclosureButton, DisclosurePanel } from '@headlessui/react'; | ||
import { ChevronRightIcon } from '@heroicons/react/24/outline'; | ||
import { ReactNode } from 'react'; | ||
|
||
interface AccordionProps { | ||
title: ReactNode; | ||
children: ReactNode; | ||
defaultOpen?: boolean; | ||
chevronPosition?: 'left' | 'right'; | ||
className?: string; | ||
} | ||
|
||
const Accordion = ({ | ||
title, | ||
children, | ||
defaultOpen = true, | ||
chevronPosition = 'left', | ||
className, | ||
}: AccordionProps) => { | ||
return ( | ||
<Disclosure as='div' defaultOpen={defaultOpen} className={className}> | ||
<div className='border-b border-gray-200 dark:border-gray-700'> | ||
<DisclosureButton className='group flex w-full items-center justify-between gap-2 rounded-lg px-4 py-3 text-left hover:bg-gray-50 dark:hover:bg-gray-700'> | ||
{chevronPosition === 'left' && ( | ||
<ChevronRightIcon | ||
className={`h-5 w-5 shrink-0 text-gray-500 transition-transform group-data-[open]:rotate-90 dark:text-gray-400`} | ||
/> | ||
)} | ||
|
||
{title} | ||
|
||
{chevronPosition === 'right' && ( | ||
<ChevronRightIcon | ||
className={`h-5 w-5 shrink-0 text-gray-500 transition-transform group-data-[open]:rotate-90 dark:text-gray-400`} | ||
/> | ||
)} | ||
</DisclosureButton> | ||
|
||
<DisclosurePanel className='px-4 py-3 text-sm text-gray-500 dark:text-gray-400' transition> | ||
<div className='origin-top transition duration-200 ease-out data-[closed]:-translate-y-2 data-[closed]:opacity-0'> | ||
{children} | ||
</div> | ||
</DisclosurePanel> | ||
</div> | ||
</Disclosure> | ||
); | ||
}; | ||
|
||
export default Accordion; |
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,3 @@ | ||
import Accordion from './Accordion'; | ||
|
||
export { Accordion }; |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove the
bg-gray
here? I think leaving it blank does look cleaner?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I add "bg-transparent" here, but other 'gray' button, I keep it as it should be "gray" theme. Or we can use 'light' button instead. new look like this
![image](https://private-user-images.githubusercontent.com/160200168/409391723-27962311-b428-428f-8ddc-92e39fc68c9c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxOTg3NDAsIm5iZiI6MTczOTE5ODQ0MCwicGF0aCI6Ii8xNjAyMDAxNjgvNDA5MzkxNzIzLTI3OTYyMzExLWI0MjgtNDI4Zi04ZGRjLTkyZTM5ZmM2OGM5Yy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQxNDQwNDBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0zZDVkZjk5ZDZlNmUyZGVkZjRhZWI2ZTMyNWIyYmRmZTJmOTQ3MzgyNmQ0MDEwYzY3YzFiOTE0NTE4ZmIzNjk0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.ccItEOIIQU18W4NbPty1hP_AcBHbHn9ercD5lns6Xj8)