web-apps/apps/presentationeditor/mobile/src/view/add/AddShape.jsx
2021-01-26 14:49:24 +03:00

30 lines
1.3 KiB
JavaScript

import React, {Fragment, useState} from 'react';
import {observer, inject} from "mobx-react";
import {Page, Navbar, List, ListItem, ListButton, Row, BlockTitle, Range, Toggle, Icon} from 'framework7-react';
import { useTranslation } from 'react-i18next';
import {Device} from '../../../../../common/mobile/utils/device';
const AddShape = props => {
const shapes = props.storeShapeSettings.getStyleGroups();
return (
<div className={'dataview shapes'}>
{shapes.map((row, indexRow) => {
return (
<ul className="row" key={'shape-row-' + indexRow}>
{row.map((shape, index) => {
return (
<li key={'shape-' + indexRow + '-' + index} onClick={() => {props.onShapeClick(shape.type)}}>
<div className="thumb"
style={{WebkitMaskImage: `url('resources/img/shapes/${shape.thumb}')`}}>
</div>
</li>
)
})}
</ul>
)
})}
</div>
)
};
export default inject("storeShapeSettings")(observer(AddShape));