Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

Move Background notices to new accordian #120

Merged
merged 1 commit into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion plugin/src/components/BackgroundNotices/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const BackgroundNotices: React.FC = () => {
className="list-group-item d-flex justify-content-left align-items-center bg-notices-text bg-primary"
key={index}
>
<span className="badge badge-information badge-pilled mr-2">{index + 1}</span>
{notice}
</li>
)
Expand Down
19 changes: 15 additions & 4 deletions plugin/src/features/Plugin/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import { hashDirAtom, compilationAtom } from '@/atoms'
import { deploymentAtom } from '@/atoms/deployment'
import { initializeRemixClient, isLoadedAtom, remixClientAtom } from '@/stores/remixClient'
import storage from '@/utils/storage'
import './styles.css'
import useAsync from '@/hooks/useAsync'
import { type AccordianTabs } from '@/types/common'
import './styles.css'

export const Plugin = () => {
const { status: compileStatus, errorMessages: compileErrorMessages } = useAtomValue(compilationAtom)
Expand Down Expand Up @@ -147,10 +147,21 @@ export const Plugin = () => {
<TransactionHistory />
</AccordionContent>
</AccordianItem>
<AccordianItem value="notices">
<AccordionTrigger
onClick={() => {
handleTabView('notices')
}}
>
<span className="d-flex align-items-center" style={{ gap: '0.5rem' }}>
<p style={{ all: 'unset' }}>Notices</p>
</span>
</AccordionTrigger>
<AccordionContent>
<BackgroundNotices />
</AccordionContent>
</AccordianItem>
</Accordian>
<div className="mt-5">
<BackgroundNotices />
</div>
</div>
<div>
<Environment />
Expand Down
2 changes: 1 addition & 1 deletion plugin/src/types/common.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export type AccordianTabs = 'compile' | 'deploy' | 'interaction' | 'transactions' | ''
export type AccordianTabs = 'compile' | 'deploy' | 'interaction' | 'transactions' | 'notices' | ''
Loading