Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ In order to apply CSS customizations on this and other blocks, follow the instru
| `container` |
| `innerContainer` |
| `shippingEstimate[--]{timeModifier}`|
| `addressMessage `|

## Contributors ✨

Expand Down
8 changes: 4 additions & 4 deletions react/components/AddressInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ import React, { Fragment, PureComponent } from 'react'
import { withScriptjs, WithScriptjsProps } from 'react-google-maps'
import { withRuntimeContext, RenderContextProps } from 'vtex.render-runtime'
import ReactGoogleAutocomplete from './ReactGooogleAutocomplete'
import { FormattedMessage, injectIntl, InjectedIntlProps } from 'react-intl'
import { injectIntl, InjectedIntlProps } from 'react-intl'
import AddressInputMessage from './AddressInputMessage'

const GEOLOCATION_TIMEOUT = 30 * 1000
const MAXIMUM_AGE = 3 * 1000


const getCurrentPositionPromise = (): Promise<Position> => {
const geolocationOptions = {
enableHighAccuracy: true,
Expand Down Expand Up @@ -110,9 +112,7 @@ class AddressInput extends PureComponent<Props & WithScriptjsProps & RenderConte

return (
<Fragment>
<div className="t-body c-on-base mv4">
<FormattedMessage id="store/pickup-availability.input-form-header" />
</div>
<AddressInputMessage />
<ReactGoogleAutocomplete
isLoading={false}
isFetchingPosition={this.state.isFetchingPosition}
Expand Down
16 changes: 16 additions & 0 deletions react/components/AddressInputMessage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React from 'react'
import { FormattedMessage } from 'react-intl'
import { useCssHandles } from 'vtex.css-handles'

const CSS_HANDLES = ['addressMessage']

const AddressInputMessage = () => {
const handles = useCssHandles(CSS_HANDLES)
return (
<div className={`t-body c-on-base mv4 ${handles.addressMessage}`}>
<FormattedMessage id="store/pickup-availability.input-form-header" />
</div>
)
}

export default AddressInputMessage