Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
159 additions
and
2 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
17 changes: 17 additions & 0 deletions
17
_pages/profile/[id]/submission-details-accordion/appeal-accordion-item.js
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,17 @@ | ||
import { | ||
AccordionItem, | ||
AccordionItemHeading, | ||
AccordionItemPanel, | ||
Text, | ||
} from "@kleros/components"; | ||
|
||
export default function AppealAccordionItem() { | ||
return ( | ||
<AccordionItem> | ||
<AccordionItemHeading>Appeal</AccordionItemHeading> | ||
<AccordionItemPanel> | ||
<Text>Appeal.</Text> | ||
</AccordionItemPanel> | ||
</AccordionItem> | ||
); | ||
} |
17 changes: 17 additions & 0 deletions
17
_pages/profile/[id]/submission-details-accordion/evidence-accordion-item.js
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,17 @@ | ||
import { | ||
AccordionItem, | ||
AccordionItemHeading, | ||
AccordionItemPanel, | ||
Text, | ||
} from "@kleros/components"; | ||
|
||
export default function EvidenceAccordionItem() { | ||
return ( | ||
<AccordionItem> | ||
<AccordionItemHeading>Evidence</AccordionItemHeading> | ||
<AccordionItemPanel> | ||
<Text>Evidence.</Text> | ||
</AccordionItemPanel> | ||
</AccordionItem> | ||
); | ||
} |
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,15 @@ | ||
import { Accordion } from "@kleros/components"; | ||
|
||
import AppealAccordionItem from "./appeal-accordion-item"; | ||
import EvidenceAccordionItem from "./evidence-accordion-item"; | ||
import VotingHistoryAccordionItem from "./voting-history-accordion-item"; | ||
|
||
export default function SubmissionDetailsAccordion() { | ||
return ( | ||
<Accordion> | ||
<AppealAccordionItem /> | ||
<EvidenceAccordionItem /> | ||
<VotingHistoryAccordionItem /> | ||
</Accordion> | ||
); | ||
} |
17 changes: 17 additions & 0 deletions
17
_pages/profile/[id]/submission-details-accordion/voting-history-accordion-item.js
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,17 @@ | ||
import { | ||
AccordionItem, | ||
AccordionItemHeading, | ||
AccordionItemPanel, | ||
Text, | ||
} from "@kleros/components"; | ||
|
||
export default function VotingHistoryAccordionItem() { | ||
return ( | ||
<AccordionItem> | ||
<AccordionItemHeading>Voting History</AccordionItemHeading> | ||
<AccordionItemPanel> | ||
<Text>Voting History.</Text> | ||
</AccordionItemPanel> | ||
</AccordionItem> | ||
); | ||
} |
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,51 @@ | ||
import { | ||
Accordion as _Accordion, | ||
AccordionItem as _AccordionItem, | ||
AccordionItemButton as _AccordionItemButton, | ||
AccordionItemHeading as _AccordionItemHeading, | ||
AccordionItemPanel as _AccordionItemPanel, | ||
} from "react-accessible-accordion"; | ||
import { Box } from "theme-ui"; | ||
|
||
export default function Accordion({ | ||
allowMultipleExpanded = true, | ||
allowZeroExpanded = true, | ||
...rest | ||
}) { | ||
return ( | ||
<Box | ||
as={(props) => ( | ||
<_Accordion | ||
allowMultipleExpanded={allowMultipleExpanded} | ||
allowZeroExpanded={allowZeroExpanded} | ||
{...rest} | ||
{...props} | ||
/> | ||
)} | ||
{...rest} | ||
/> | ||
); | ||
} | ||
|
||
export function AccordionItem(props) { | ||
return <Box as={_AccordionItem} variant="accordion.item" {...props} />; | ||
} | ||
|
||
export function AccordionItemHeading(props) { | ||
return ( | ||
<Box | ||
as={({ children, ...rest }) => ( | ||
<_AccordionItemHeading {...props} {...rest}> | ||
<Box as={_AccordionItemButton} variant="accordion.heading"> | ||
{children} | ||
</Box> | ||
</_AccordionItemHeading> | ||
)} | ||
{...props} | ||
/> | ||
); | ||
} | ||
|
||
export function AccordionItemPanel(props) { | ||
return <Box as={_AccordionItemPanel} variant="accordion.panel" {...props} />; | ||
} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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