Skip to content

Instantly share code, notes, and snippets.

import React from 'react';
import {findDOMNode} from 'react-dom';
import css from './App.scss';
import HTML5Backend from 'react-dnd-html5-backend';
import {DragDropContext, DragSource, DropTarget} from 'react-dnd';
//PHASE
class Phase extends React.Component {
@shlomitc
shlomitc / ModelExample.js
Created September 4, 2018 17:10
An example showing how to test the content of a wix-style-react Modal (same approach for Tooltip)
import React from 'react';
import Modal from 'wix-style-react/Modal';
import Button from 'wix-style-react/Button';
import {MessageBoxFunctionalLayout} from 'wix-style-react/MessageBox';
class ModalExample extends React.Component {
state = {open: false};
handleToggleModal = () => this.setState({open: !this.state.open});
@shlomitc
shlomitc / apis-composition-wrapping.md
Last active April 2, 2019 14:19
Components APIs - Composition vs. Wrapping

Components APIs - Composition vs. Wrapping

The Task:

Create a preview component for social links:

image

The component should be created on top of existing components in the library. Consider the following components:

  1. Text - represnets text in different combinations
@shlomitc
shlomitc / gist:4b99cab22d79e8a5d4d9a76a91ba074f
Created October 7, 2020 19:38
create css classes during runtime
<style
dangerouslySetInnerHTML={{
__html: `
.my-class {
color: red;
}
}}
></style>