mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 11:06:40 +07:00
svg buttons (initial)
removed styled-components gradient paths
This commit is contained in:
parent
245b559e2d
commit
7229a48297
22 changed files with 853 additions and 89 deletions
49
src/components/panels/EditorPanel.jsx
Normal file
49
src/components/panels/EditorPanel.jsx
Normal file
|
@ -0,0 +1,49 @@
|
|||
import React from 'react';
|
||||
import { MODES } from '$constants/modes';
|
||||
import classnames from 'classnames';
|
||||
|
||||
import { Icon } from '$components/Icon';
|
||||
|
||||
export class EditorPanel extends React.PureComponent {
|
||||
startPolyMode = () => this.props.editor.changeMode(MODES.POLY);
|
||||
|
||||
startStickerMode = () => this.props.editor.changeMode(MODES.STICKERS);
|
||||
|
||||
startRouterMode = () => this.props.editor.changeMode(MODES.ROUTER);
|
||||
|
||||
startShotterMode = () => this.props.editor.changeMode(MODES.SHOTTER);
|
||||
|
||||
render() {
|
||||
const { mode } = this.props;
|
||||
|
||||
return (
|
||||
<div id="control-screen">
|
||||
<button
|
||||
className={classnames({ active: mode === MODES.ROUTER })}
|
||||
onClick={this.startRouterMode}
|
||||
>
|
||||
<Icon icon="icon-router" />
|
||||
</button>
|
||||
<button
|
||||
className={classnames({ active: mode === MODES.POLY })}
|
||||
onClick={this.startPolyMode}
|
||||
>
|
||||
<Icon icon="icon-poly" />
|
||||
</button>
|
||||
<button
|
||||
className={classnames({ active: mode === MODES.STICKERS })}
|
||||
onClick={this.startStickerMode}
|
||||
>
|
||||
<Icon icon="icon-sticker" />
|
||||
</button>
|
||||
|
||||
<button
|
||||
className={classnames({ active: mode === MODES.SHOTTER })}
|
||||
onClick={this.startShotterMode}
|
||||
>
|
||||
<Icon icon="icon-shooter" />
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue