UNPKG

wix-style-react

Version:
48 lines (44 loc) 1.31 kB
import React from 'react'; import CardGalleryItem from 'wix-style-react/CardGalleryItem'; import { Container, Row, Col } from 'wix-style-react/Grid'; import styles from './ExampleBasic.scss'; var backgroundImageUrl = 'https://static.wixstatic.com/media/89ea07a19c3d415e99a8a8a3c0ab1de8.jpg/v1/fill/w_343,h_343,al_c,q_80,usm_0.66_1.00_0.01/89ea07a19c3d415e99a8a8a3c0ab1de8.jpg'; var generateCardGallery = function generateCardGallery() { return React.createElement(CardGalleryItem, { title: 'Card Title', subtitle: 'Card subtitle', primaryActionProps: { label: 'Button', onClick: function onClick() { alert('Primary action clicked'); } }, secondaryActionProps: { label: 'Text link', onClick: function onClick() { alert('Secondary action clicked'); } }, backgroundImageUrl: backgroundImageUrl, 'data-hook': 'storybook-card-gallery-item' }); }; export default (function () { return React.createElement( 'div', { className: styles.wrapper }, React.createElement( Container, null, Array(2).fill(React.createElement( Row, null, Array(3).fill(React.createElement( Col, { span: 4 }, generateCardGallery() )) )) ) ); });