on master help sign in
fix: mini back button lies flush against column edge
8868a90Matt Condon (shrugs)
src/components/MiniBackButton.js+1−1
@@ -5,7 +5,7 @@ import { IconButton } from 'indigo-react';
5import { ReactComponent as Back } from 'assets/back.svg';
5import { ReactComponent as Back } from 'assets/back.svg';
6
6
7export default ({ className, ...rest }) => (
7export default ({ className, ...rest }) => (
8− <IconButton {...rest}>
8+ <IconButton {...rest} flush>
9 <Back className={cn('black', className)} />
9 <Back className={cn('black', className)} />
10 </IconButton>
10 </IconButton>
11);
11);
src/indigo-react/components/IconButton.js+5−1
@@ -10,6 +10,7 @@ export default function IconButton({
10 disabled = false,
10 disabled = false,
11 secondary = false,
11 secondary = false,
12 solid = false,
12 solid = false,
13+ flush = false, // whether or not the icon should include horizontal padding
13 ...rest
14 ...rest
14}) {
15}) {
15 return (
16 return (
@@ -18,7 +19,10 @@ export default function IconButton({
18 align="center"
19 align="center"
19 justify="center"
20 justify="center"
20 className={cn(
21 className={cn(
21− 'pointer p2',
22+ 'pointer pv2',
23+ {
24+ ph2: !flush,
25+ },
22 {
26 {
23 'bg-black': solid && !secondary && !disabled,
27 'bg-black': solid && !secondary && !disabled,
24 'bg-gray3': (solid && disabled) || (solid && secondary),
28 'bg-gray3': (solid && disabled) || (solid && secondary),