-
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 pull request #11 from Emurgo/denis/yoext-964
Tabs for gov actions
- Loading branch information
Showing
10 changed files
with
2,326 additions
and
709 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
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
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,29 @@ | ||
import React from 'react' | ||
import {ModalWindowContent} from '../ui-constants' | ||
|
||
const GovToolsPanel = (props) => { | ||
const {certLabel, clickFunction, children} = props | ||
const handleAction = () => { | ||
console.log(`[dApp][GovToolsPanel][${certLabel}] Building the certificate is called`) | ||
// action here | ||
clickFunction() | ||
} | ||
|
||
return ( | ||
<div className={ModalWindowContent.contentPadding}> | ||
{children} | ||
<div className="flex"> | ||
<div className="flex-auto mt-5"> | ||
<button | ||
className="w-full py-1 rounded-md text-xl text-white font-semibold bg-orange-700 hover:bg-orange-800 active:bg-orange-500" | ||
onClick={handleAction} | ||
> | ||
Build Cert | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
export default GovToolsPanel |
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 TabsComponent from '../tabsComponent' | ||
|
||
const ConstitCommCertsTab = () => { | ||
const data = [ | ||
{ | ||
label: 'Authorize CC Hot Credential', | ||
value: 'authHotCred', | ||
children: <></>, | ||
}, | ||
{ | ||
label: 'Resign CC Cold Credential', | ||
value: 'resignColdCredential', | ||
children: <></>, | ||
}, | ||
] | ||
|
||
return ( | ||
<div className="mt-2"> | ||
<TabsComponent tabsData={data} /> | ||
</div> | ||
) | ||
} | ||
|
||
export default ConstitCommCertsTab |
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,45 @@ | ||
import React from 'react' | ||
import TabsComponent from '../tabsComponent' | ||
|
||
const GovActionsTab = () => { | ||
const data = [ | ||
{ | ||
label: 'Motion of no-confidence', | ||
value: 'motionNoConfidence', | ||
children: <></>, | ||
}, | ||
{ | ||
label: 'Update Cons. Committe', | ||
value: 'updConsComm', | ||
children: <></>, | ||
}, | ||
{ | ||
label: 'Update Constitution', | ||
value: 'updConstitution', | ||
children: <></>, | ||
}, | ||
{ | ||
label: 'Hard-Fork Initation', | ||
value: 'hfInit', | ||
children: <></>, | ||
}, | ||
{ | ||
label: 'Treasury Withdrawal', | ||
value: 'treasuryWithdrawal', | ||
children: <></>, | ||
}, | ||
{ | ||
label: 'Info Action', | ||
value: 'infoAct', | ||
children: <></>, | ||
}, | ||
] | ||
|
||
return ( | ||
<div className="mt-2"> | ||
<TabsComponent tabsData={data} /> | ||
</div> | ||
) | ||
} | ||
|
||
export default GovActionsTab |
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,60 @@ | ||
import React from 'react' | ||
import TabsComponent from '../tabsComponent' | ||
import VoteDelegationPanel from '../../cards/voteDelegationPanel' | ||
|
||
const GovBasicFunctionsTab = ({api, wasm, onWaiting, onError, getters, setters}) => { | ||
const data = [ | ||
{ | ||
label: 'Vote Delegation', | ||
value: 'voteDeleg', | ||
children: ( | ||
<VoteDelegationPanel | ||
api={api} | ||
wasm={wasm} | ||
onWaiting={onWaiting} | ||
onError={onError} | ||
getters={getters} | ||
setters={setters} | ||
/> | ||
), | ||
}, | ||
{ | ||
label: 'DRep Registration', | ||
value: 'drepReg', | ||
children: <></>, | ||
}, | ||
{ | ||
label: 'DRep Update', | ||
value: 'drepUpdate', | ||
children: <></>, | ||
}, | ||
{ | ||
label: 'DRep Retirement', | ||
value: 'drepRet', | ||
children: <></>, | ||
}, | ||
{ | ||
label: 'Vote', | ||
value: 'vote', | ||
children: <></>, | ||
}, | ||
{ | ||
label: 'Register Stake Key', | ||
value: 'regStakeKey', | ||
children: <></>, | ||
}, | ||
{ | ||
label: 'Unregister Stake Key', | ||
value: 'unregStakeKey', | ||
children: <></>, | ||
}, | ||
] | ||
|
||
return ( | ||
<div className="mt-2"> | ||
<TabsComponent tabsData={data} /> | ||
</div> | ||
) | ||
} | ||
|
||
export default GovBasicFunctionsTab |
Oops, something went wrong.