import React from 'react'; import { STICKERS } from '~/constants/stickers'; import * as EDITOR_ACTIONS from '~/redux/editor/actions'; import { connect } from 'react-redux'; const mapStateToProps = () => ({}); const mapDispatchToProps = { editorSetActiveSticker: EDITOR_ACTIONS.editorSetActiveSticker, }; type Props = ReturnType & typeof mapDispatchToProps & { width: number; }; const StickersDialogUnconnected = ({ editorSetActiveSticker, width }: Props) => (
{Object.keys(STICKERS).map(set => (
{STICKERS[set].title || null}
{Object.keys(STICKERS[set].layers).map(sticker => (
editorSetActiveSticker({ set, sticker })} /> ))}
))}
); const StickersDialog = connect(mapStateToProps, mapDispatchToProps)(StickersDialogUnconnected); export { StickersDialog };