Skip to content

Commit 9cba448

Browse files
committed
refactor: improve styling in narrative itineraries header
Address comments in #359
1 parent b5b356e commit 9cba448

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

Diff for: lib/components/narrative/narrative-itineraries-header.js

+10-7
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@ const IssueButton = styled.button`
99
border-radius: 5px;
1010
display: inline-block;
1111
font-size: 12px;
12-
padding: 4px;
13-
14-
span {
15-
margin-left: 4px;
16-
}
12+
padding: 2px 4px;
1713
`
1814

1915
export default function NarrativeItinerariesHeader ({
@@ -62,7 +58,14 @@ export default function NarrativeItinerariesHeader ({
6258
<Icon type='arrow-left' /> View all options
6359
</button>
6460

65-
{itineraryIsExpanded && <SaveTripButton />}
61+
{itineraryIsExpanded && (
62+
// marginLeft: auto is a way of making something "float right"
63+
// within a flex container
64+
// see https://stackoverflow.com/a/36182782/269834
65+
<div style={{marginLeft: 'auto'}}>
66+
<SaveTripButton />
67+
</div>
68+
)}
6669
</>
6770
: <>
6871
<div
@@ -76,7 +79,7 @@ export default function NarrativeItinerariesHeader ({
7679
</span>
7780
{errors.length > 0 && (
7881
<IssueButton onClick={onToggleShowErrors}>
79-
<Icon type='warning' />
82+
<Icon style={{fontSize: 11, marginRight: 2}} type='warning' />
8083
<span>{errors.length} issues</span>
8184
</IssueButton>
8285
)}

0 commit comments

Comments
 (0)