import React, { Component } from 'react'; import Carousel from 'react-elastic-carousel'; import './index.scss'; export default function Keyboard({ options, action }) { options = options.length ? options : [[{ text: 'اشتباه' }]]; return (
{options.map((row, i) => ( ))}
); } const Row = ({ row, action }) => { return (
{row.map((item, i) => ( ))}
); }; const KeyboardItem = ({ item, action }) => { return (
{ action(item); }} > {item.text}
); };