Skip to content

Commit

Permalink
Add KnownAppBadge for Voting and DotVoting
Browse files Browse the repository at this point in the history
(cherry picked from commit 7045292)
  • Loading branch information
ottodevs committed Sep 27, 2019
1 parent c14c46c commit bdace18
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 4 deletions.
29 changes: 26 additions & 3 deletions src/templates/kit/screens/DotVotingScreen.js
Expand Up @@ -4,6 +4,7 @@ import { GU, Help, Info } from '@aragon/ui'
import {
Duration,
Header,
KnownAppBadge,
Navigation,
PercentageField,
ScreenPropsType,
Expand Down Expand Up @@ -34,10 +35,10 @@ function reduceFields(fields, [field, value]) {
}
if (field === 'quorum') {
return { ...fields, quorum: value }
}
}
if (field === 'support') {
return { ...fields, support: value }
}
}
return fields
}

Expand Down Expand Up @@ -150,7 +151,29 @@ function DotVotingScreen({
>
<Header
title="Configure template"
subtitle="Choose your Dot Voting app settings below"
subtitle={
<span
css={`
display: flex;
align-items: center;
justify-content: center;
`}
>
Choose your
<span
css={`
display: flex;
margin: 0 ${1.5 * GU}px;
`}
>
<KnownAppBadge
appName="dot-voting.hatch.aragonpm.eth"
label="Dot Voting"
/>
</span>
settings below.
</span>
}
/>
<PercentageField
ref={handleSupportRef}
Expand Down
22 changes: 21 additions & 1 deletion src/templates/kit/screens/VotingScreen.js
Expand Up @@ -4,6 +4,7 @@ import { GU, Help, Info } from '@aragon/ui'
import {
Duration,
Header,
KnownAppBadge,
Navigation,
PercentageField,
ScreenPropsType,
Expand Down Expand Up @@ -137,7 +138,26 @@ function VotingScreen({
>
<Header
title="Configure template"
subtitle="Choose your Voting app settings below."
subtitle={
<span
css={`
display: flex;
align-items: center;
justify-content: center;
`}
>
Choose your
<span
css={`
display: flex;
margin: 0 ${1.5 * GU}px;
`}
>
<KnownAppBadge appName="voting.aragonpm.eth" label="Voting" />
</span>
settings below.
</span>
}
/>

<PercentageField
Expand Down

0 comments on commit bdace18

Please sign in to comment.