on master help sign in
fix: use correct unicodes for indigo
commitd2ad64e8f90a9cd0eb9889530901c282f551d686 authorMatt Condon (shrugs) <mattgcondon@gmail.com> dateMon 8 Jul 2019, 14:29 (7 years ago) parent537ff5b
8 files changed+35−32
src/components/Buttons.js+3−3 src/components/UploadButton.js+1−1 src/indigo-react/components/AccessoryIcon.js+1−1 src/indigo-react/components/CheckboxInput.js+21−21 src/indigo-react/components/SelectInput.js+3−1 src/views/Login.js+1−1 src/views/Login/Ledger.js+4−3 src/views/Login/Trezor.js+1−1
src/components/Buttons.js+3−3
@@ -1,9 +1,9 @@
11import React from 'react';
22import { Button } from 'indigo-react';
33
4−// TODO: use svg icons
5−export const ForwardButton = props => <Button accessory="→" {...props} />;
6−export const DownloadButton = props => <Button accessory="⬇" {...props} />;
4+// NOTE: the -> is correct because inter recognizes the pair
5+export const ForwardButton = props => <Button accessory="->" {...props} />;
6+export const DownloadButton = props => <Button accessory="↓" {...props} />;
77export const OutButton = props => (
88 <Button as="a" target="_blank" accessory="↗" {...props} />
99);
src/components/UploadButton.js+1−1
@@ -6,7 +6,7 @@ export default function UploadButton({ children, onChange, ...rest }) {
66
77 return (
88 <label htmlFor="file" {...rest}>
9− <Button accessory="⬆">{children}</Button>
9+ <Button accessory="↑">{children}</Button>
1010 <input
1111 id="file"
1212 ref={button}
src/indigo-react/components/AccessoryIcon.js+1−1
@@ -4,7 +4,7 @@ import Flex from './Flex';
44
55const PENDING_ACCESSORY = '⋯';
66const SUCCESS_ACCESSORY = '✓';
7−const FAILURE_ACCESSORY = '×';
7+const FAILURE_ACCESSORY = '✗';
88
99function AccessoryIcon({ ...props }) {
1010 return (
src/indigo-react/components/CheckboxInput.js+21−21
@@ -2,6 +2,7 @@ import React from 'react';
22import cn from 'classnames';
33
44import Flex from './Flex';
5+import AspectRatio from 'components/AspectRatio';
56
67// TODO: make this look like screens
78export default function CheckboxInput({
@@ -35,7 +36,7 @@ export default function CheckboxInput({
3536}) {
3637 return (
3738 <Flex
38− className={className}
39+ className={cn(className, 'mv2')}
3940 row
4041 align="center"
4142 style={{
@@ -44,35 +45,34 @@ export default function CheckboxInput({
4445 cursor: 'not-allowed',
4546 }),
4647 }}>
48+ {/* we totally hide the checkbox itself */}
4749 <Flex.Item
4850 as="input"
4951 {...rest}
50− className={cn(
51− 'b b1 p3 outline-none',
52− {
53− 'bg-white': !disabled,
54− 'bg-gray1': disabled,
55− },
56− {
57− gray4: !focused,
58− black: focused,
59− },
60− {
61− 'b-green3': visiblyPassed,
62− 'b-black': focused && !visiblyPassed,
63− 'b-yellow3': !focused && hintError,
64− 'b-gray3': !focused && !hintError && !visiblyPassed,
65− }
66− )}
52+ className={cn('super-hidden')}
6753 id={name}
6854 name={name}
6955 {...bind}
7056 />
57+ {/* and then display a prettier one in its stead */}
7158 <Flex.Item
59+ flex
7260 as="label"
73− className="f6 ph3 lh-tall us-none"
74− htmlFor={name}
75− flex>
61+ className="f6 mr3 lh-tall us-none clickable flex-row align-center"
62+ htmlFor={name}>
63+ <Flex
64+ justify="center"
65+ align="center"
66+ className={cn('b-black b1 p1 mr3', {
67+ 'bg-black white': data,
68+ 'bg-white black': !data,
69+ })}
70+ style={{
71+ height: '14px',
72+ width: '14px',
73+ }}>
74+ {data && '✓'}
75+ </Flex>
7676 {label}
7777 </Flex.Item>
7878 </Flex>
src/indigo-react/components/SelectInput.js+3−1
@@ -58,7 +58,9 @@ export default function SelectInput({
5858 };
5959
6060 // redefine accessory because we still want to ignore it from the ..rest above
61− accessory = <AccessoryIcon>{isOpen ? '⬆' : '⬇'}</AccessoryIcon>;
61+ accessory = (
62+ <AccessoryIcon className="gray4">{isOpen ? '▲' : '▼'}</AccessoryIcon>
63+ );
6264
6365 const text = options.find(o => o.value === data).text;
6466
src/views/Login.js+1−1
@@ -123,7 +123,7 @@ export default function Login() {
123123 full
124124 as={ForwardButton}
125125 solid
126− className="mt3"
126+ className="mt2"
127127 disabled={Maybe.Nothing.hasInstance(wallet)}
128128 onClick={doContinue}>
129129 Continue
src/views/Login/Ledger.js+4−3
@@ -1,4 +1,5 @@
11import React, { useCallback, useEffect } from 'react';
2+import cn from 'classnames';
23import Maybe from 'folktale/maybe';
34import { P, Text, Input, Grid, H5, CheckboxInput } from 'indigo-react';
45import { times } from 'lodash';
@@ -169,14 +170,14 @@ export default function Ledger({ className }) {
169170 full={full}
170171 half={half && 1}
171172 as={SelectInput}
172− className="pr1"
173+ className={cn({ pr1: half })}
173174 {...derivationPathInput}
174175 />
175176 <Grid.Item
176177 full={full}
177178 half={half && 2}
178179 as={SelectInput}
179− className="pl1"
180+ className={cn({ pl1: half })}
180181 {...accountInput}
181182 />
182183 </>
@@ -188,7 +189,7 @@ export default function Ledger({ className }) {
188189 full
189190 as={ForwardButton}
190191 solid
191− className="mt3"
192+ className="mt2"
192193 onClick={pollDevice}>
193194 Authenticate
194195 </Grid.Item>
src/views/Login/Trezor.js+1−1
@@ -110,7 +110,7 @@ export default function Trezor({ className }) {
110110 full
111111 as={ForwardButton}
112112 solid
113− className="mt3"
113+ className="mt2"
114114 onClick={pollDevice}>
115115 Authenticate
116116 </Grid.Item>