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

Commit

Permalink
Merge pull request #120 from NethermindEth/feature/notices-accordian
Browse files Browse the repository at this point in the history
Move Background notices to new accordian
  • Loading branch information
satyambnsal authored Jun 25, 2024
2 parents 8466144 + 77b7878 commit b97199c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
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' | ''

0 comments on commit b97199c

Please sign in to comment.