Skip to content

Commit 3138f85

Browse files
authored
Merge pull request #13 from lob/css2
Reverts back to inline styles due to webpack import issue
2 parents d57cd8e + 5c6fb8a commit 3138f85

File tree

4 files changed

+53
-49
lines changed

4 files changed

+53
-49
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lob/react-address-autocomplete",
3-
"version": "1.1.8",
3+
"version": "1.1.10",
44
"description": "A collection of components and utility functions for verifying and suggesting addresses using Lob",
55
"author": "Lob",
66
"license": "MIT",

src/Autocomplete.js

Lines changed: 50 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import React, { useEffect, useState, useRef } from 'react'
33
import Select, { components } from 'react-select'
44
import throttle from 'lodash.throttle'
5-
import styles from './Autocomplete.module.css'
65

76
// Internal Dependencies
87
import { postAutocompleteAddress } from './api'
@@ -11,12 +10,49 @@ const LOB_LABEL = 'lob-label'
1110
const LOB_URL =
1211
'https://www.lob.com/address-verification?utm_source=autocomplete&utm_medium=react'
1312

14-
const LobLogo = ({ className }) => {
13+
const lobGrayText = {
14+
color: '#888',
15+
textDecoration: 'inherit'
16+
}
17+
18+
const lobLabel = {
19+
alignItems: 'center',
20+
borderBottom: '1px solid #DDDDDD',
21+
cursor: 'pointer',
22+
display: 'flex',
23+
fontSize: '17px',
24+
padding: '16px',
25+
pointerEvents: 'none'
26+
}
27+
28+
const lobLabelLink = {
29+
fontWeight: 600,
30+
color: '#0699D6',
31+
textDecoration: 'inherit'
32+
}
33+
34+
const lobLabelText = {
35+
flex: 1,
36+
fontWeight: 400,
37+
marginLeft: '12px'
38+
}
39+
40+
const lobLogo = {
41+
height: '.9em',
42+
marginLeft: '1px',
43+
marginTop: '3px'
44+
}
45+
46+
const logoLarge = {
47+
height: '21px'
48+
}
49+
50+
const LobLogo = ({ style }) => {
1551
return (
1652
<svg
1753
xmlns='http://www.w3.org/2000/svg'
1854
viewBox='0 0 1259 602'
19-
className={className}
55+
style={style}
2056
>
2157
<path
2258
fill='#0099d7'
@@ -28,17 +64,21 @@ const LobLogo = ({ className }) => {
2864
}
2965

3066
const poweredByLob = () => (
31-
<a href={LOB_URL} className={styles.lobGrayText}>
67+
<a href={LOB_URL} style={lobGrayText}>
3268
<span style={{ verticalAlign: 'top' }}>Powered by </span>
33-
<LobLogo className={styles.lobLogo} />
69+
<LobLogo style={lobLogo} />
3470
</a>
3571
)
3672

3773
const getLobLabel = () => (
38-
<div className={styles.lobLabel}>
39-
<LobLogo className={styles.logoLarge} />
40-
<span className={styles.lobGrayText}>Deliverable addresses</span>
41-
<a href={LOB_URL}>Learn more</a>
74+
<div style={lobLabel}>
75+
<LobLogo style={logoLarge} />
76+
<span style={{ ...lobGrayText, ...lobLabelText }}>
77+
Deliverable addresses
78+
</span>
79+
<a style={lobLabelLink} href={LOB_URL}>
80+
Learn more
81+
</a>
4282
</div>
4383
)
4484

@@ -76,7 +116,7 @@ const getOptionElement = (suggestion, inputValue) => {
76116
return (
77117
<span>
78118
{primaryLineElement}
79-
<span className={styles.lobGrayText}>
119+
<span style={lobGrayText}>
80120
{city},&nbsp;{state.toUpperCase()},&nbsp;{zip_code}
81121
</span>
82122
</span>

src/Autocomplete.module.css

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)