mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 03:29:16 +00:00
adding theme context to modal shortcut
This commit is contained in:
parent
c04cd4c270
commit
f0134493db
@ -6,10 +6,11 @@ import { LogoutOutlined, InfoCircleOutlined, ExclamationCircleOutlined, DownOutl
|
|||||||
|
|
||||||
export function Identity({ openAccount, openCards, cardUpdated }) {
|
export function Identity({ openAccount, openCards, cardUpdated }) {
|
||||||
|
|
||||||
|
const [modal, modalContext] = Modal.useModal();
|
||||||
const { state, actions } = useIdentity();
|
const { state, actions } = useIdentity();
|
||||||
|
|
||||||
const logout = () => {
|
const logout = () => {
|
||||||
Modal.confirm({
|
modal.confirm({
|
||||||
title: 'Are you sure you want to logout?',
|
title: 'Are you sure you want to logout?',
|
||||||
icon: <LogoutOutlined />,
|
icon: <LogoutOutlined />,
|
||||||
onOk() {
|
onOk() {
|
||||||
@ -36,6 +37,7 @@ export function Identity({ openAccount, openCards, cardUpdated }) {
|
|||||||
return (
|
return (
|
||||||
<Dropdown overlay={menu} overlayStyle={{ minWidth: 0 }} trigger={['click']} placement="bottomRight">
|
<Dropdown overlay={menu} overlayStyle={{ minWidth: 0 }} trigger={['click']} placement="bottomRight">
|
||||||
<IdentityWrapper>
|
<IdentityWrapper>
|
||||||
|
{ modalContext }
|
||||||
{ state.init && (
|
{ state.init && (
|
||||||
<Logo url={state.url} width={40} height={40} radius={4} />
|
<Logo url={state.url} width={40} height={40} radius={4} />
|
||||||
)}
|
)}
|
||||||
|
Loading…
Reference in New Issue
Block a user