on master help sign in
fix: mini back button lies flush against column edge
commit8868a90c638b3442a8283bca013c6d1e2f17d54f authorMatt Condon (shrugs) <mattgcondon@gmail.com> dateMon 15 Jul 2019, 12:22 (7 years ago) parente2f6917
2 files changed+6−2
src/components/MiniBackButton.js+1−1 src/indigo-react/components/IconButton.js+5−1
src/components/MiniBackButton.js+1−1
@@ -5,7 +5,7 @@ import { IconButton } from 'indigo-react';
55import { ReactComponent as Back } from 'assets/back.svg';
66
77export default ({ className, ...rest }) => (
8− <IconButton {...rest}>
8+ <IconButton {...rest} flush>
99 <Back className={cn('black', className)} />
1010 </IconButton>
1111);
src/indigo-react/components/IconButton.js+5−1
@@ -10,6 +10,7 @@ export default function IconButton({
1010 disabled = false,
1111 secondary = false,
1212 solid = false,
13+ flush = false, // whether or not the icon should include horizontal padding
1314 ...rest
1415}) {
1516 return (
@@ -18,7 +19,10 @@ export default function IconButton({
1819 align="center"
1920 justify="center"
2021 className={cn(
21− 'pointer p2',
22+ 'pointer pv2',
23+ {
24+ ph2: !flush,
25+ },
2226 {
2327 'bg-black': solid && !secondary && !disabled,
2428 'bg-gray3': (solid && disabled) || (solid && secondary),