mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-26 03:26: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
|
@ -1,35 +0,0 @@
|
|||
import React from 'react';
|
||||
import { PROVIDERS, replaceProviderUrl } from '$constants/providers';
|
||||
import { Icon } from '$components/panels/Icon';
|
||||
import classnames from 'classnames';
|
||||
|
||||
type Props = {
|
||||
changeProvider: Function,
|
||||
provider: String,
|
||||
};
|
||||
|
||||
export const ProviderDialog = ({ provider, changeProvider }: Props) => (
|
||||
<div className="control-dialog top right control-dialog-provider">
|
||||
<div className="helper provider-helper">
|
||||
{
|
||||
Object.keys(PROVIDERS).map(item => (
|
||||
<div
|
||||
className={classnames('provider-helper-thumb', { active: provider === item })}
|
||||
style={{
|
||||
backgroundImage: `url(${replaceProviderUrl(item, { x: 5980, y: 2589, zoom: 13 })})`,
|
||||
}}
|
||||
onMouseDown={() => changeProvider(item)}
|
||||
key={PROVIDERS[item].name}
|
||||
>
|
||||
{
|
||||
provider === item &&
|
||||
<div className="provider-helper-check">
|
||||
<Icon icon="icon-check-1" />
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue