mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-26 03:26:41 +07:00
redux: trashing fixed
This commit is contained in:
parent
eb5b0e5d28
commit
2171a50ef1
7 changed files with 109 additions and 70 deletions
|
@ -1,22 +1,23 @@
|
|||
// @flow
|
||||
import React from 'react';
|
||||
|
||||
import { stickers } from '$constants/stickers';
|
||||
import sprite from '$sprites/stickers.svg';
|
||||
|
||||
export class StickersDialog extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<div className="helper stickers-helper">
|
||||
{
|
||||
stickers.map(sticker => (
|
||||
<div className="sticker-preview" key={sticker}>
|
||||
<svg width={48} height={48} viewBox="0 0 64 64" onClick={() => this.props.editor.setSticker(sticker)}>
|
||||
<use xlinkHref={`${sprite}#sticker-${sticker}`} x="0" y="0" width="64" height="64" />
|
||||
</svg>
|
||||
</div>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
type Props = {
|
||||
setActiveSticker: Function
|
||||
};
|
||||
|
||||
export const StickersDialog = ({ setActiveSticker }: Props) => (
|
||||
<div className="helper stickers-helper">
|
||||
{
|
||||
stickers.map(sticker => (
|
||||
<div className="sticker-preview" key={sticker}>
|
||||
<svg width={48} height={48} viewBox="0 0 64 64" onClick={() => setActiveSticker(sticker)}>
|
||||
<use xlinkHref={`${sprite}#sticker-${sticker}`} x="0" y="0" width="64" height="64" />
|
||||
</svg>
|
||||
</div>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue