mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-05-13 03:46:41 +07:00
moved components to TypeScript
This commit is contained in:
parent
85b8860862
commit
0a01c91271
54 changed files with 2771 additions and 5134 deletions
31
src/components/dialogs/LogoDialog.tsx
Normal file
31
src/components/dialogs/LogoDialog.tsx
Normal file
|
@ -0,0 +1,31 @@
|
|||
import * as React from 'react';
|
||||
import { LOGOS } from '$constants/logos';
|
||||
import { Icon } from '$components/panels/Icon';
|
||||
import classnames from 'classnames';
|
||||
import { setLogo as setLogoAction } from "$redux/user/actions";
|
||||
import { IRootState } from "$redux/user/reducer";
|
||||
|
||||
interface Props extends IRootState {
|
||||
setLogo: typeof setLogoAction,
|
||||
}
|
||||
|
||||
export const LogoDialog = ({ logo, setLogo }: Props) => (
|
||||
<div className="control-dialog top">
|
||||
<div className="helper logo-helper">
|
||||
<div className="helper-back">
|
||||
<Icon icon="icon-logo" size={200} />
|
||||
</div>
|
||||
{
|
||||
Object.keys(LOGOS).map(item => (
|
||||
<div
|
||||
className={classnames('helper-menu-item', { active: (item === logo) })}
|
||||
onMouseDown={() => setLogo(item)}
|
||||
key={item}
|
||||
>
|
||||
{LOGOS[item][0]}
|
||||
</div>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue