-
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.
Merge branch 'develop' into feature/refactor-asset-apis
- Loading branch information
Showing
13 changed files
with
438 additions
and
205 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import React from 'react'; | ||
import { BsChevronDown, BsChevronUp } from 'react-icons/bs'; | ||
|
||
// Info: (20241001 - Anna) 定義 CollapseButton 的 props 類型 | ||
interface CollapseButtonProps { | ||
onClick: () => void; | ||
isCollapsed: boolean; | ||
} | ||
|
||
const CollapseButton: React.FC<CollapseButtonProps> = ({ onClick, isCollapsed }) => { | ||
return ( | ||
<p className="inline-flex"> | ||
<button className="rounded px-2" onClick={onClick} type="button" aria-expanded={!isCollapsed}> | ||
{/* Info: (20241001 - Anna) 根據狀態顯示對應箭頭 */} | ||
{isCollapsed ? ( | ||
<BsChevronUp style={{ color: 'var(--neutral-500)' }} /> | ||
) : ( | ||
<BsChevronDown style={{ color: 'var(--neutral-500)' }} /> | ||
)} | ||
</button> | ||
</p> | ||
); | ||
}; | ||
|
||
export default CollapseButton; |
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.