mirror of
https://github.com/billsonnn/nitro-react.git
synced 2025-02-21 10:52:36 +01:00
Update toolbar
This commit is contained in:
parent
2819df2ecc
commit
8ae63f0c36
@ -5,6 +5,7 @@ import { TransitionAnimationTypes } from './TransitionAnimation.types';
|
|||||||
|
|
||||||
export function getTransitionAnimationStyle(type: string, transition: TransitionStatus, timeout: number = 300): Partial<CSSProperties>
|
export function getTransitionAnimationStyle(type: string, transition: TransitionStatus, timeout: number = 300): Partial<CSSProperties>
|
||||||
{
|
{
|
||||||
|
console.log(type, transition, timeout);
|
||||||
switch(type)
|
switch(type)
|
||||||
{
|
{
|
||||||
case TransitionAnimationTypes.BOUNCE:
|
case TransitionAnimationTypes.BOUNCE:
|
||||||
@ -93,6 +94,7 @@ export function getTransitionAnimationStyle(type: string, transition: Transition
|
|||||||
default:
|
default:
|
||||||
return {}
|
return {}
|
||||||
case ENTERING:
|
case ENTERING:
|
||||||
|
console.log('ya????')
|
||||||
return {
|
return {
|
||||||
animationName: `fadeIn`,
|
animationName: `fadeIn`,
|
||||||
animationDuration: `${ timeout }ms`
|
animationDuration: `${ timeout }ms`
|
||||||
|
@ -54,14 +54,6 @@ export const ToolbarView: FC<ToolbarViewProps> = props =>
|
|||||||
}
|
}
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
function toggleMeToolbar(): void
|
|
||||||
{
|
|
||||||
setMeExpanded(prevValue =>
|
|
||||||
{
|
|
||||||
return !prevValue;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
CreateMessageHook(UserInfoEvent, onUserInfoEvent);
|
CreateMessageHook(UserInfoEvent, onUserInfoEvent);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -72,7 +64,7 @@ export const ToolbarView: FC<ToolbarViewProps> = props =>
|
|||||||
<div className="d-flex nitro-toolbar py-1 px-3">
|
<div className="d-flex nitro-toolbar py-1 px-3">
|
||||||
<div className="navigation-items navigation-avatar pe-1 me-2">
|
<div className="navigation-items navigation-avatar pe-1 me-2">
|
||||||
<div className="navigation-item">
|
<div className="navigation-item">
|
||||||
<div className={ 'toolbar-avatar ' + (isMeExpanded ? 'active ' : '') } onClick={ toggleMeToolbar }>
|
<div className={ 'toolbar-avatar ' + (isMeExpanded ? 'active ' : '') } onClick={ event => setMeExpanded(!isMeExpanded) }>
|
||||||
{ userInfo && <AvatarImageView figure={ userInfo.figure } direction={ 2 } /> }
|
{ userInfo && <AvatarImageView figure={ userInfo.figure } direction={ 2 } /> }
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user