on master help sign in
Buttons as grid items, instead of inside them
commit619d158f1de81d63e7f58f6e486bc1eb1f770a5f authorFang <git@fang.io> dateWed 3 Jul 2019, 21:09 (7 years ago) parent3894182
3 files changed+41−38
src/views/Admin.js+20−19 src/views/Permissions.js+13−11 src/views/Point.js+8−8
src/views/Admin.js+20−19
@@ -47,28 +47,29 @@ export default function Admin() {
4747 return (
4848 <View>
4949 <Grid className="pt2">
50− <Grid.Item full>
51− <ForwardButton
52− disabled={!canDownloadPassport}
53− onClick={goRedownload}
54− detail="Re-download your paper wallet">
55− Download Passport
56− </ForwardButton>
50+ <Grid.Item
51+ full
52+ as={ForwardButton}
53+ disabled={!canDownloadPassport}
54+ onClick={goRedownload}
55+ detail="Re-download your paper wallet">
56+ Download Passport
5757 </Grid.Item>
5858 <Grid.Divider />
59− <Grid.Item full>
60− <ForwardButton
61− onClick={goReticket}
62− detail="//TODO disable if not logged in as owner">
63− Reticket
64− </ForwardButton>
59+ <Grid.Item
60+ full
61+ as={ForwardButton}
62+ disabled={!isOwner}
63+ onClick={goReticket}
64+ detail="Move to brand new wallet, re-setting all permissions">
65+ Reticket
6566 </Grid.Item>
66− <Grid.Item full>
67− <ForwardButton
68− onClick={goEditPerms}
69− detail="Management, networking keys, etc.">
70− Edit permissions
71− </ForwardButton>
67+ <Grid.Item
68+ full
69+ as={ForwardButton}
70+ onClick={goEditPerms}
71+ detail="Management, networking keys, etc.">
72+ Edit permissions
7273 </Grid.Item>
7374 </Grid>
7475
src/views/Permissions.js+13−11
@@ -133,10 +133,12 @@ export default function Permissions() {
133133 return (
134134 <View>
135135 <Grid className="pt2">
136− <Grid.Item full>
137− <ForwardButton disabled="true" detail={pointDetails.owner}>
138− Ownership address
139− </ForwardButton>
136+ <Grid.Item
137+ full
138+ as={ForwardButton}
139+ disabled="true"
140+ detail={pointDetails.owner}>
141+ Ownership address
140142 </Grid.Item>
141143 {proxyAction(
142144 'Management',
@@ -145,13 +147,13 @@ export default function Permissions() {
145147 )}
146148 {spawnProxyAction}
147149 {votingProxyAction}
148− <Grid.Item full>
149− <ForwardButton
150− disabled={!canManage}
151− onClick={goSetKeys}
152− detail={netKeysText}>
153− Network keys
154− </ForwardButton>
150+ <Grid.Item
151+ full
152+ as={ForwardButton}
153+ disabled={!canManage}
154+ onClick={goSetKeys}
155+ detail={netKeysText}>
156+ Network keys
155157 </Grid.Item>
156158 </Grid>
157159
src/views/Point.js+8−8
@@ -48,16 +48,16 @@ export default function Point() {
4848 <View>
4949 <Passport point={Maybe.Just(point)} />
5050 <Grid className="pt2">
51− <Grid.Item full>
52− <ForwardButton disabled={!hasInCache} onClick={goAdmin}>
53− Admin
54− </ForwardButton>
51+ <Grid.Item
52+ full
53+ as={ForwardButton}
54+ disabled={!hasInCache}
55+ onClick={goAdmin}>
56+ Admin
5557 </Grid.Item>
5658 <Grid.Divider />
57− <Grid.Item full>
58− <ForwardButton detail="Boot your computer" disabled>
59− Boot Arvo
60− </ForwardButton>
59+ <Grid.Item full as={ForwardButton} detail="Boot your computer" disabled>
60+ Boot Arvo
6161 </Grid.Item>
6262 {showActions && (
6363 <Grid.Item full>