Merge branch 'master' of https://github.com/vercel/commerce into agnostic

This commit is contained in:
Luis Alvarez
2021-02-12 14:56:03 -05:00
15 changed files with 948 additions and 1683 deletions

View File

@@ -7,7 +7,7 @@
}
.root:focus {
@apply shadow-outline outline-none;
@apply shadow-outline-normal outline-none;
}
.root[data-active] {

View File

@@ -3,5 +3,5 @@
}
.root:focus {
@apply outline-none shadow-outline-gray;
@apply outline-none shadow-outline-normal;
}

View File

@@ -52,6 +52,10 @@ type Action =
type: 'SET_MODAL_VIEW'
view: MODAL_VIEWS
}
| {
type: 'SET_USER_AVATAR'
value: string
}
type MODAL_VIEWS = 'SIGNUP_VIEW' | 'LOGIN_VIEW' | 'FORGOT_VIEW'
type ToastText = string
@@ -123,6 +127,12 @@ function uiReducer(state: State, action: Action) {
toastText: action.text,
}
}
case 'SET_USER_AVATAR': {
return {
...state,
userAvatar: action.value,
}
}
}
}
@@ -147,6 +157,9 @@ export const UIProvider: FC = (props) => {
const openToast = () => dispatch({ type: 'OPEN_TOAST' })
const closeToast = () => dispatch({ type: 'CLOSE_TOAST' })
const setUserAvatar = (value: string) =>
dispatch({ type: 'SET_USER_AVATAR', value })
const setModalView = (view: MODAL_VIEWS) =>
dispatch({ type: 'SET_MODAL_VIEW', view })
@@ -164,6 +177,7 @@ export const UIProvider: FC = (props) => {
setModalView,
openToast,
closeToast,
setUserAvatar,
}),
[state]
)