mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-28 12:36:41 +07:00
sticker panel with ability to choose
This commit is contained in:
parent
40a11297c0
commit
f2c9cc4abc
10 changed files with 140 additions and 64 deletions
22
src/components/stickers/StickersHelper.jsx
Normal file
22
src/components/stickers/StickersHelper.jsx
Normal file
|
@ -0,0 +1,22 @@
|
|||
import React from 'react';
|
||||
|
||||
import { stickers } from '$constants/stickers';
|
||||
import sprite from '$sprites/stickers.svg';
|
||||
|
||||
export class StickersHelper extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<div className="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>
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue