path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
src/checkbox/SKCheckbox.js | ShaneKing/sk-antd | import {Checkbox} from 'antd';
import PropTypes from 'prop-types';
import React from 'react';
import {Proxy0, SK} from 'sk-js';
import AntdComp from '../AntdComp';
Checkbox.defaultProps = SK.extends(true, {}, {
autoFocus: false,
checked: false,
defaultChecked: false,
indeterminate: false,
}, Checkbox.defaultPr... |
docs/src/app/components/pages/components/Menu/ExampleIcons.js | w01fgang/material-ui | import React from 'react';
import Paper from 'material-ui/Paper';
import Menu from 'material-ui/Menu';
import MenuItem from 'material-ui/MenuItem';
import RemoveRedEye from 'material-ui/svg-icons/image/remove-red-eye';
import PersonAdd from 'material-ui/svg-icons/social/person-add';
import ContentLink from 'material-ui... |
app/packs/src/components/nmr_sim/SampleDetailsTabName.js | ComPlat/chemotion_ELN | import React from 'react';
export default <div style={{ maxHeight: 25 }}>NMR</div>;
|
src/message/TimeRow.js | saketkumar95/zulip-mobile | /* @flow */
import React from 'react';
import {
StyleSheet,
Text,
View,
} from 'react-native';
import { HALF_COLOR } from '../styles';
import { humanDate } from '../utils/date';
const styles = StyleSheet.create({
row: {
padding: 8,
flexDirection: 'row',
alignItems: 'center',
overflow: 'hidden'... |
fields/components/columns/CloudinaryImageSummary.js | Pop-Code/keystone | import React from 'react';
const IMAGE_SIZE = 18;
const linkStyle = {
marginRight: 8,
};
const boxStyle = {
borderRadius: 3,
display: 'inline-block',
height: IMAGE_SIZE,
overflow: 'hidden',
verticalAlign: 'middle',
width: IMAGE_SIZE,
};
const imageStyle = {
display: 'block',
height: IMAGE_SIZE,
left: '50%',... |
src/components/book/BookPage.js | minaz912/book-store | import React from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import * as bookActions from '../../actions/bookActions';
class Book extends React.Component {
constructor(props) {
super(props);
}
submitBook(input) {
this.props.createBook(input);
}
render() {
... |
src/components/index.js | Starotitorov/online-notes | import React from 'react';
import ErrorsList from './containers/ErrorsList';
import './index.scss';
export const App = ({ children }) =>
<div className="app">
<ErrorsList/>
{children}
</div>;
export const Whoops404 = () =>
<div className="nb-error">
<div className="error-code">404<... |
src/icons/GroupIcon.js | kiloe/ui | import React from 'react';
import Icon from '../Icon';
export default class GroupIcon extends Icon {
getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M32 22c3.31 0 5.98-2.69 5.98-6s-2.67-6-5.98-6c-3.31 0-6 2.69-6 6s2.69 6 6 6zm-16 0c3.31 0 5.98-2.69 5.98-6s-... |
src/svg-icons/av/library-add.js | tan-jerene/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvLibraryAdd = (props) => (
<SvgIcon {...props}>
<path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-1 9h-4v4h-2v-4H9V9h4V5h2v4h4v2z"/>
</S... |
src/modules/search/components/SearchToolDropdown/SearchToolDropdown.js | CtrHellenicStudies/Commentary | import React from 'react';
import PropTypes from 'prop-types';
import FlatButton from 'material-ui/FlatButton';
import FontIcon from 'material-ui/FontIcon';
import IconButton from 'material-ui/IconButton';
const SearchToolDropdown = ({ name, children, open, toggle, disabled }) => (
<div className={`dropdown search-dr... |
actor-apps/app-web/src/app/components/common/Banner.react.js | luoxiaoshenghustedu/actor-platform | import React from 'react';
import BannerActionCreators from 'actions/BannerActionCreators';
class Banner extends React.Component {
constructor(props) {
super(props);
if (window.localStorage.getItem('banner_jump') === null) {
BannerActionCreators.show();
}
}
onClose = () => {
BannerActionC... |
docs/app/Examples/elements/Divider/Variations/DividerExampleClearing.js | aabustamante/Semantic-UI-React | import React from 'react'
import { Segment, Button, Divider } from 'semantic-ui-react'
const DividerExampleClearing = () => (
<Segment>
<Button floated='right'>Floated Button</Button>
<Divider clearing />
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore.... |
src/components/AuctionStepper/AuctionStepper.js | chochinlu/ens-bid-dapp | import React from 'react';
import classNames from 'classnames/bind';
import './AuctionStepper.css';
const Step = (props) => {
const stepClass = classNames('Step',
props.currentStep === props.name ? 'current' : 'not-current'
);
return (
<div className={stepClass}>
<h4>{props.title}</h4>
</di... |
app/views/Watches/WatchTable.js | herereadthis/redwall | import React from 'react';
import WatchActions from './WatchActions.js';
export default class Homepage extends React.Component {
constructor() {
super();
}
componentWillMount() {
}
componentDidMount() {
}
componentWillReceiveProps(nextProps) {
if (nextProps.cacheValidity... |
local-cli/templates/HelloNavigation/views/chat/ChatScreen.js | rickbeerendonk/react-native | import React, { Component } from 'react';
import {
ActivityIndicator,
Button,
FlatList,
StyleSheet,
Text,
TextInput,
View,
} from 'react-native';
import KeyboardSpacer from '../../components/KeyboardSpacer';
import Backend from '../../lib/Backend';
export default class ChatScreen extends Component {
s... |
app/components/ProfileButtons/index.js | ledminh/ledminh-home | import React from 'react';
import Wrapper from './wrapper';
import {renderButtons} from './utils';
import messages from './messages';
const ProfileButtons = ({current_profile}) => (
<Wrapper current_profile={current_profile}>
{renderButtons({buttons: messages.buttons, current_profile})}
</Wrapper>
);
Prof... |
src/svg-icons/action/settings-input-hdmi.js | skarnecki/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionSettingsInputHdmi = (props) => (
<SvgIcon {...props}>
<path d="M18 7V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v3H5v6l3 6v3h8v-3l3-6V7h-1zM8 4h8v3h-2V5h-1v2h-2V5h-1v2H8V4z"/>
</SvgIcon>
);
ActionSettingsInputHd... |
src/layouts/Burger.js | btthomas/blakeandanna | import React from 'react';
import ClickOutside from 'react-click-outside';
class Burger extends React.Component {
constructor(props) {
super(props);
this.state = {
isOpen: false
}
this.toggleMenu = this.toggleMenu.bind(this);
}
handleClickOutside() {
this.setState({
isOpen: false... |
src/client/songs/usersongs.react.js | steida/songary | import Component from '../components/component.react';
import Loading from '../components/loading.react';
import React from 'react';
import SongLink from '../songs/songlink.react';
import listenFirebase from '../firebase/listenfirebase';
import {lastUpdatedSorter} from './song.js';
@listenFirebase(props => ({
action... |
client/pages/filespage/frequently_access.js | mickael-kerjean/nuage | import React from 'react';
import ReactCSSTransitionGroup from 'react-addons-css-transition-group';
import { Container, Icon, NgIf } from '../../components/';
import { Link } from 'react-router-dom';
import Path from 'path';
import './frequently_access.scss';
export class FrequentlyAccess extends React.Component {
... |
client/src/app/components/Summoner.js | rajington/heartseekers | import React from 'react';
import { PromiseState } from 'react-refetch';
import connect from '../api-connector';
import PromiseStateContainer from './PromiseStateContainer';
import ChampionInfo from './ChampionInfo';
import LolImg from './LolImg';
const Summoner = ({ summonerFetch }) => (
<PromiseStateContainer
... |
admin/client/App/screens/List/components/ItemsTable/ItemsTableDragDropZoneTarget.js | frontyard/keystone | /**
* THIS IS ORPHANED AND ISN'T RENDERED AT THE MOMENT
* THIS WAS DONE TO FINISH THE REDUX INTEGRATION, WILL REWRITE SOON
* - @mxstbr
*/
import React from 'react';
import { DropTarget } from 'react-dnd';
import { setCurrentPage } from '../../actions';
let timeoutID = false;
// drop target
var ItemsTableDragDro... |
app/components/team/Pipelines/row.js | fotinakis/buildkite-frontend | import React from 'react';
import PropTypes from 'prop-types';
import Panel from '../../shared/Panel';
import Button from '../../shared/Button';
import Spinner from '../../shared/Spinner';
import FlashesStore from '../../../stores/FlashesStore';
import permissions from '../../../lib/permissions';
import Pipeline fro... |
front/components/landingpage/landinglogin.js | bigkangtheory/wanderly | import React, { Component } from 'react';
class LandingLogin extends Component {
constructor(props) {
super(props);
this.state = {
email: '',
password: ''
}
}
handleChange = (e) => {
this.setState({[e.target.name]: e.target.value})
console.log(e.target.name, e.target.value)
}
... |
test/integration/basic/pages/hmr/style.js | flybayer/next.js | import React from 'react'
export default () => {
return (
<React.Fragment>
<div className="hmr-style-page">
<p>
This is the style page.
<style jsx>{`
p {
font-size: 100px;
}
`}</style>
</p>
</div>
</React.Fragment>... |
tests/react_experimental/useDeferredValue_hook.js | mroch/flow | // @flow
import React from 'react';
const deferredValue = React.useDeferredValue(true); // Ok
(deferredValue: boolean); // Ok
React.useDeferredValue(true, {}); // Error: no more than 1 argument is expected by function type
|
src/svg-icons/hardware/keyboard-backspace.js | ngbrown/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareKeyboardBackspace = (props) => (
<SvgIcon {...props}>
<path d="M21 11H6.83l3.58-3.59L9 6l-6 6 6 6 1.41-1.41L6.83 13H21z"/>
</SvgIcon>
);
HardwareKeyboardBackspace = pure(HardwareKeyboardBackspace);
Ha... |
ui/src/js/common/navbar/UserDetails.js | Dica-Developer/weplantaforest | import React, { Component } from 'react';
import { browserHistory } from 'react-router';
require('./userDetails.less');
export default class NavBar extends Component {
constructor(props) {
super(props);
}
componentDidMount() {}
logout() {
localStorage.setItem('jwt', '');
localStorage.setItem('us... |
src/views/Charts/Charts.js | hungtruongquoc/shipper_front | import React, { Component } from 'react';
import { Bar, Doughnut, Line, Pie, Polar, Radar } from 'react-chartjs-2';
const line = {
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
datasets: [
{
label: 'My First dataset',
fill: false,
lineTension: 0.1,
background... |
docs/src/app/components/pages/components/SelectField/Page.js | lawrence-yu/material-ui | import React from 'react';
import Title from 'react-title-component';
import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
import selectFieldReadmeText from './README';
import SelectFieldExampleSimple fr... |
src/containers/Register.js | StandpointNG/fix-log-mobile | /**
* Register.js
*
* Allow user to register
*/
'use strict'
/**
* ## Imports
*
* Redux
*/
import { bindActionCreators } from 'redux'
import { connect } from 'react-redux'
/**
* The actions we need
*/
import * as authActions from '../reducers/auth/authActions'
/**
* LoginRender
*/
import LoginRender fro... |
src/routes/error/index.js | ACPK/react-starter-kit | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import ErrorPage from './Err... |
app-client.js | jeantimex/react-socket | import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, hashHistory } from 'react-router';
import App from './src/app';
import Join from './src/modules/join';
ReactDOM.render((
<Router history={ hashHistory }>
<Route path="/" component={ App }>
<Route path="/join" c... |
src/components/Page/Page.js | nicolascine/site | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import PropTypes from 'prop-... |
src/projects/ProjectCard.js | easyCZ/open-sourcery | import React from 'react';
import { Button, Card, Image } from 'semantic-ui-react'
import { Header } from 'semantic-ui-react'
import { Icon, Label } from 'semantic-ui-react'
const styles = {
card: {
margin: '0.5em'
},
logo: {
width: '90px',
height: '90px',
// padding: '10px',
objectFit: 'sc... |
src/routes/routes.js | ResistanceCalendar/resistance-calendar-frontend | import React from 'react';
import { Route, Switch } from 'react-router-dom';
import withTracker from './withTracker';
import {
App,
Events,
EventDetailsContainer,
ThankYou,
PrivacyPolicy
} from '../components';
// React router v4 - https://reacttraining.com/react-router/
const rootRoutes = (
<Switch>
... |
actor-apps/app-web/src/app/components/modals/CreateGroup.react.js | greatdinosaur/actor-platform | import React from 'react';
import CreateGroupActionCreators from 'actions/CreateGroupActionCreators';
import CreateGroupStore from 'stores/CreateGroupStore';
import CreateGroupForm from './create-group/Form.react';
import Modal from 'react-modal';
import { KeyCodes } from 'constants/ActorAppConstants';
const appEl... |
src/components/Input/Input.js | dingo-d/pokemon-app | import React from 'react';
import styles from './Input.css';
const Input = ({name, label, value, placeholder, type, onClick, handleChange, required }) => (
<div className={styles.field}>
<input
type={type}
className={styles.input}
placeholder={placeholder}
id={name}
required={requir... |
app/containers/ViewerContainer/index.js | brietsparks/curr__ui-rbp-apollo-cvb | /*
*
* ViewerContainer
*
*/
import React from 'react';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import makeSelectViewerContainer from './selectors';
export class ViewerContainer extends React.Component { // eslint-disable-line react/prefer-stateless-function
re... |
src/core/components/Error404.js | devteamreims/4me.react | // @flow
import React, { Component } from 'react';
class Error404 extends Component {
props: {};
render() {
return (
<div>This page does not exist !</div>
);
}
}
export default Error404;
|
src/components/Button/Button.js | austinknight/ui-components | import React from 'react';
import styled, { keyframes, withTheme } from 'styled-components';
import * as _ from 'lodash';
import Loader from '../Loader';
import {
colors,
typography,
boxShadows,
renderThemeIfPresentOrDefault,
renderThemeKeyOrDefaultValue,
ifThemeInPropsIsPresentUse,
} from '../styles';
ex... |
definitions/npm/styled-components_v2.x.x/flow_v0.53.x-/test_styled-components_v2.x.x.js | mkscrg/flow-typed | // @flow
import {renderToString} from 'react-dom/server'
import styled, {
ThemeProvider,
withTheme,
keyframes,
ServerStyleSheet,
StyleSheetManager
} from 'styled-components'
import React from 'react'
import type {
Theme,
Interpolation,
ReactComponentFunctional,
ReactComponentFunctionalUndefinedDefault... |
packages/core/admin/admin/src/content-manager/pages/ListView/PaginationFooter/index.js | wistityhq/strapi | import React from 'react';
import PropTypes from 'prop-types';
import { Box } from '@strapi/design-system/Box';
import { Flex } from '@strapi/design-system/Flex';
import { PaginationURLQuery, PageSizeURLQuery } from '@strapi/helper-plugin';
const PaginationFooter = ({ pagination }) => {
return (
<Box paddingTop=... |
codes/chapter06/src/components/TodoList.js | atlantis1024/react-step-by-step | import React from 'react'
import PropTypes from 'prop-types'
import Todo from './Todo'
const TodoList = ({ todos, onTodoClick }) => (
<ul>
{todos.map(todo =>
<Todo
key={todo.id}
{...todo}
onClick={() => onTodoClick(todo.id)}
/>
)}
</ul>
)
TodoList.propTypes = {
todos:... |
example/examples/CustomSelectionsExample.react.js | Neophy7e/react-bootstrap-typeahead | import React from 'react';
import {Typeahead} from '../../src/';
/* example-start */
const CustomSelectionsExample = React.createClass({
render() {
return (
<Typeahead
allowNew
multiple
newSelectionPrefix="Add a new item: "
options={[]}
placeholder="Type anything..."... |
src/RoyalRoad.WebUI/js/common/viewport/viewport.js | huytrongnguyen/royal-road | import React from 'react';
import { Component, HashRouter, Container } from '~/ert';
import Header from './header';
import Footer from './footer';
@Component({
view: ({ activeNav }) => {
return <Container>
<Header activeNav={activeNav} />
<HashRouter />
<Footer />
</Container>
},
})
expor... |
examples/js/pagination/pagination-hook-table.js | AllenFang/react-bootstrap-table | /* eslint max-len: 0 */
/* eslint no-alert: 0 */
import React from 'react';
import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table';
const products = [];
function addProducts(quantity) {
const startId = products.length;
for (let i = 0; i < quantity; i++) {
const id = startId + i;
produc... |
src/components/manageVacancy/ManageVacancy.js | Vasyl1989/Opus.ua | import React from 'react';
import HeaderForEmployer from '../common/HeaderForEmployer';
import Footer from '../common/Footer';
import ContextManage from './ContextManage';
import TitleBarManagePage from './titleBarManagePage';
const ManageVacancy = () => {
return (
<div>
<HeaderForEmployer />
<TitleBarManage... |
src/routes/Counter/components/Counter.js | VinodJayasinghe/CircleCI | import React from 'react'
import PropTypes from 'prop-types'
export const Counter = ({ counter, increment, doubleAsync }) => (
<div style={{ margin: '0 auto' }} >
<h2>Counter: {counter}</h2>
<button className='btn btn-primary' onClick={increment}>
Increment
</button>
{' '}
<button className... |
.history/src/instacelebs_20171001002609.js | oded-soffrin/gkm_viewer |
import React from 'react';
import {render} from 'react-dom';
import { Provider } from 'react-redux';
import configureStore from './store/configureStore';
require('./favicon.ico'); // Tell webpack to load favicon.ico
import './styles/styles.scss'; // Yep, that's right. You can import SASS/CSS files too! Webpack will r... |
src/components/flash/flash_messages_list.js | trihpham/flashcard-webapp | import React, { Component } from 'react';
import { connect } from 'react-redux';
import FlashMesage from './flash_message';
import { deleteFlashMessage } from '../../actions/flash_messages';
class FlashMessagesList extends Component {
constructor(props){
super(props);
}
render(){
const messages = this.props.me... |
src/main/resources/static/scripts/components/EditArticle.js | davidbogue/Urbane | /*
Edit Article
*/
import React from 'react';
import client from '../client';
import Navigation from './Navigation';
import Footer from './Footer';
import MarkdownViewer from './MarkdownViewer';
import { History } from 'react-router';
var EditArticle = React.createClass({
mixins : [History],
getInitialS... |
src/components/pontoon.js | mozilla/advocacy.mozilla.org | import React from 'react';
var enablePontoon = process.env.ENABLE_PONTOON === 'true';
var Pontoon = React.createClass({
render: function() {
if (enablePontoon) {
return (
<script src='https://pontoon.mozilla.org/pontoon.js'></script>
);
}
return null;
}
});
module.exports = Pontoo... |
good-old-react-authentication-flow/src/components/InputDescription/index.js | strapi/strapi-examples | import React from 'react';
import PropTypes from 'prop-types';
import { isEmpty, isFunction } from 'lodash';
import cn from 'classnames';
import './styles.css';
function InputDescription(props) {
let content = props.children;
if (typeof props.message === 'string') {
content = props.message;
}
if (isFunc... |
packages/reactor-conference-app/src/speakers/Speaker.js | sencha/extjs-reactor | import React, { Component } from 'react';
import { Container, Panel } from '@extjs/ext-react';
import ScheduleList from '../schedule/ScheduleList';
import { connect } from 'react-redux';
import { setTitle } from '../actions';
class Speaker extends Component {
constructor({ schedule }) {
super();
... |
examples/with-loading/pages/index.js | arunoda/next.js | import React from 'react'
import Header from '../components/Header'
export default () => (
<div>
<Header />
<p>Hello Next!</p>
</div>
)
|
docs/app/Examples/views/Comment/Types/CommentExampleComment.js | ben174/Semantic-UI-React | import React from 'react'
import { Button, Comment, Form, Header } from 'semantic-ui-react'
const CommentExampleComment = () => (
<Comment.Group>
<Header as='h3' dividing>Comments</Header>
<Comment>
<Comment.Avatar src='http://semantic-ui.com/images/avatar/small/matt.jpg' />
<Comment.Content>
... |
src/Menu/SimpleMenu/SimpleMenu.js | gutenye/react-mc | // @flow
import React from 'react'
import cx from 'classnames'
import { MDCSimpleMenuFoundation, util } from '@material/menu/dist/mdc.menu'
import * as helper from '../../helper'
import type { PropsC } from '../../types'
class Menu extends React.Component {
props: {
/** items: [{text, disabled, ...props}] */
... |
examples/todomvc/containers/Root.js | rmadsen/redux | import React, { Component } from 'react';
import TodoApp from './TodoApp';
import { createStore } from 'redux';
import { Provider } from 'react-redux';
import rootReducer from '../reducers';
const store = createStore(rootReducer);
export default class Root extends Component {
render() {
return (
<Provider... |
src/routes/login/index.js | lisong/code-push-web | import React from 'react';
import Layout from '../../components/Layout';
import LogoutContainer from '../../containers/LogoutContainer';
const login = {
path: '/login',
async action({ store }) {
if (process.env.BROWSER) {
}
const LoginContainer = await require.ensure([], require => require('../../con... |
src/library.js | FreemapSlovakia/toposcope-maker | import Toposcope from './toposcope.jsx';
import React from 'react';
import ReactDOM from 'react-dom';
export function render(element, props) {
ReactDOM.render(<Toposcope {...props}/>, element);
}
|
src/components/StatusChange/StatusChange.js | expdevelop/yoap | import React from 'react'
import { Select } from 'components'
//import s from './StatusChange.sass'
const StatusChange = ({data, value, onChange}) => (
<Select defaultValue={value} data={data} onChange={onChange} />
);
export default StatusChange;
|
SearchBar.js | ananddayalan/react-native-material-design-searchbar | import React from 'react';
import PropTypes from 'prop-types'
import {
TextInput,
StyleSheet,
View,
TouchableOpacity,
ActivityIndicator,
Text,
Keyboard,
} from 'react-native';
import Icon from 'react-native-vector-icons/Ionicons';
const styles = StyleSheet.create({
searchBar: {
flexDirection: 'row'... |
app/ui/settings/index.js | gurel/marvin | import React from 'react';
import { render } from 'react-dom';
import { Router, hashHistory } from 'react-router';
import routes from './routes';
import './app.global.css';
const history = hashHistory;
if (window.entryPoint === 'SETTINGS') {
require('electron').ipcRenderer.on('start-render', (event, settings) => {
... |
app/views/Exam/ExamLineView.js | sshumway/NREMT_Practical_Flashcards | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import {
View,
Text,
StyleSheet,
TouchableOpacity
} from 'react-native';
import ExamLineText from './ExamLineText';
class ExamLineView extends Component {
constructor(props) {
super(props);
this.state = {
showLine: t... |
examples/paste-html/index.js | ashutoshrishi/slate | import Html from 'slate-html-serializer'
import { Editor, getEventTransfer } from 'slate-react'
import { Value } from 'slate'
import React from 'react'
import initialValue from './value.json'
/**
* Tags to blocks.
*
* @type {Object}
*/
const BLOCK_TAGS = {
p: 'paragraph',
li: 'list-item',
ul: 'bulleted-lis... |
src/examples/grid.js | JiaoJian1221/react-mdc-web | import React from 'react';
import {
Grid, Cell,
} from '../components'
export class GridTest extends React.Component {
render() {
return (
<section>
<Grid>
<Cell className="Cell">4</Cell>
<Cell className="Cell">4</Cell>
<Cell className="Cell">4</Cell>
</Grid>... |
services/ui/src/components/Environments/index.stories.js | amazeeio/lagoon | import React from 'react';
import mocks, { seed } from 'api/src/mocks';
import Environments from './index';
export default {
component: Environments,
title: 'Components/Environments',
}
seed();
const data = mocks.Query().allEnvironments();
export const Default = () => (
<Environments
environments={data}
... |
creditcard/src/App.js | balaSpyrus/wave11 | import FlatButton from 'material-ui/FlatButton';
import React, { Component } from 'react';
import './App.css';
import NewCard from "./components/newCard";
import SavedCards from "./components/savedCards";
import { makeStyles } from '@material-ui/core/styles';
import Button from '@material-ui/core/Button';
const useSty... |
src/js/CheckboxTree.js | jakezatecky/react-checkbox-tree | import classNames from 'classnames';
import isEqual from 'lodash/isEqual';
import memoize from 'lodash/memoize';
import { nanoid } from 'nanoid';
import PropTypes from 'prop-types';
import React from 'react';
import Button from './Button';
import constants from './constants';
import NodeModel from './NodeModel';
impor... |
src/containers/Home.js | availabs/avail_app_bootstrap | import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import './Home.css';
export default class Home extends Component {
constructor(props) {
super(props);
this.state = {
isLoading: true,
notes: []
};
}
render() {
return (
<div className="content-w... |
stories/modal.js | emsiengineering/emsi-ui | import React from 'react';
import { storiesOf, action } from '@kadira/storybook';
import Modal from '../src/components/Modal';
storiesOf('Modal', module)
.add('activates with button and text in button and not a card', () => (
<Modal title="Test" buttonChild="Test">Text</Modal>
))
.add(
'activates with b... |
src/nav/NavButton.js | Sam1301/zulip-mobile | /* @flow */
import React from 'react';
import { StyleSheet, View } from 'react-native';
import type { StyleObj } from '../types';
import { BRAND_COLOR, CONTROL_SIZE } from '../styles';
import { Touchable } from '../common';
import Icon from '../common/Icons';
const styles = StyleSheet.create({
frame: {
width: C... |
src/svg-icons/communication/forum.js | pancho111203/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationForum = (props) => (
<SvgIcon {...props}>
<path d="M21 6h-2v9H6v2c0 .55.45 1 1 1h11l4 4V7c0-.55-.45-1-1-1zm-4 6V3c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v14l4-4h10c.55 0 1-.45 1-1z"/>
</SvgIcon>
);
Co... |
client/src/js/components/app.js | nicksenger/marvelous | import React, { Component } from 'react';
import ReactCSSTransitionGroup from 'react-addons-css-transition-group';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { Link } from 'react-router';
import { loginCheck } from '../actions/index';
import BurgerMenu from './burger';
imp... |
test/components/TopBar/TopBar.js | karmapa17/garchen-panel | import test from 'ava';
import React from 'react';
import {shallow, mount} from 'enzyme';
import TopBar from './../../../src/components/TopBar/TopBar';
test('TopBar should render properly', (t) => {
const wrapper = shallow((
<TopBar>
<p>Just a simple paragraph here.</p>
</TopBar>
));
t.is(wrappe... |
src/routes/Reddit/index.js | YannickBochatay/JSYG-starterkit | import React from 'react'
import { FormattedMessage } from "react-intl"
import SearchReddit from "./containers/SearchReddit"
import RedditList from "./containers/RedditList"
class Reddit extends React.Component {
render() {
return (
<article pad="medium">
<h2>
Reddit
</h2>
... |
src/components/ResultPage/ResultHeader.js | alexeiaccio/moscowriver | import React from 'react'
import styled from 'styled-components'
import { key } from 'styled-theme'
import { BaseWrapper, WaveWrapper, StyledLink, Row } from 'Styled'
import { WavePattern, Title, ResultLinks } from 'Components'
import { Link } from '../Link/Link'
const TitleLink = styled(Link)`
position: relative;
... |
packages/icons/src/md/action/ZoomIn.js | suitejs/suitejs | import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdZoomIn(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M31.729 28.642L42 38.933 38.933 42 28.642 31.729v-1.626l-.556-.576a13.32 13.32 0 0 1-8.707 3.231C11.99 32.758 6 26.768 6 19.38 6 11.99 11.99 6 19.38 6... |
newclient/scripts/components/config/entities/questionnaire/index.js | kuali/research-coi | /*
The Conflict of Interest (COI) module of Kuali Research
Copyright © 2005-2016 Kuali, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
Lic... |
src/svg-icons/action/theaters.js | pradel/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionTheaters = (props) => (
<SvgIcon {...props}>
<path d="M18 3v2h-2V3H8v2H6V3H4v18h2v-2h2v2h8v-2h2v2h2V3h-2zM8 17H6v-2h2v2zm0-4H6v-2h2v2zm0-4H6V7h2v2zm10 8h-2v-2h2v2zm0-4h-2v-2h2v2zm0-4h-2V7h2v2z"/>
</SvgI... |
src/components/ContentFromRTD/index.js | ProteinsWebTeam/interpro7-client | // @flow
import React from 'react';
import T from 'prop-types';
import { createSelector } from 'reselect';
import loadData from 'higherOrder/loadData';
import { getReadTheDocsURL } from 'higherOrder/loadData/defaults';
import ContentFromRST from 'components/ContentFromRST';
/*:: type DataType = null | {
ok: bool,
... |
assets/jqwidgets/demos/react/app/chart/fluidsize/app.js | juannelisalde/holter | import React from 'react';
import ReactDOM from 'react-dom';
import JqxChart from '../../../jqwidgets-react/react_jqxchart.js';
class App extends React.Component {
render() {
let source =
{
datatype: 'csv',
datafields: [
{ name: 'Country' },
... |
frontend/src/Calendar/Header/CalendarHeaderConnector.js | geogolem/Radarr | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import { gotoCalendarNextRange, gotoCalendarPreviousRange, gotoCalendarToday, setCalendarView } from 'Store/Actions/calendarActions';
import createDimensionsSel... |
src/components/observable/separators.js | philpl/rxjs-diagrams | import React from 'react'
import { white } from '../../constants/colors'
import repeat from '../../utils/repeat'
import points from '../../utils/points'
import scaleVector from '../../utils/scaleVector'
import {
HEIGHT_FACTOR
} from './constants'
const WIDTH_FACTOR = 0.005
const Separators = ({ height, width, tra... |
src/plugins/epl-vizceral/components/TrafficTools.js | erlanglab/erlangpl-ui | // @flow
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { push } from 'react-router-redux';
import './TrafficTools.css';
class TrafficTools extends Component {
handleClick(index: number) {
const view = this.props.view.slice(0, index);
const path = `/traffic${view.len... |
examples/huge-apps/routes/Course/routes/Assignments/components/Assignments.js | zipongo/react-router | import React from 'react'
class Assignments extends React.Component {
render() {
return (
<div>
<h3>Assignments</h3>
{this.props.children || <p>Choose an assignment from the sidebar.</p>}
</div>
)
}
}
module.exports = Assignments
|
public/client/routes/shell/components/footer.js | nearform/concorda-dashboard | 'use strict'
import React from 'react'
export default React.createClass({
render: function () {
return (
<footer className="footer txt-small txt-dimmed mt2x mb txt-center has-icon" role="contentinfo">
<div className="container-fluid">
<a href="https://github.com/nearform/concorda/issues"... |
src/svg-icons/device/storage.js | hwo411/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceStorage = (props) => (
<SvgIcon {...props}>
<path d="M2 20h20v-4H2v4zm2-3h2v2H4v-2zM2 4v4h20V4H2zm4 3H4V5h2v2zm-4 7h20v-4H2v4zm2-3h2v2H4v-2z"/>
</SvgIcon>
);
DeviceStorage = pure(DeviceStorage);
DeviceS... |
frontend/src/InteractiveImport/InteractiveImportModal.js | Radarr/Radarr | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import Modal from 'Components/Modal/Modal';
import InteractiveImportSelectFolderModalContentConnector from './Folder/InteractiveImportSelectFolderModalContentConnector';
import InteractiveImportModalContentConnector from './Interactive/Intera... |
src/ListComponent.js | hugomd/fodmap-react | import React, { Component } from 'react';
import { Table, Icon, Message } from 'semantic-ui-react';
import data from './data/food.json';
class List extends Component {
render() {
let list = [];
let categories = data.categories;
data.foods.forEach((item, index) => {
if (item.name.toLowerCase().inc... |
src/components/RestrictedBarChart.js | wrleskovec/thoughtcrime | import React from 'react';
import Chart from 'chart.js';
import moment from 'moment';
export default class RestrictedBarChart extends React.Component {
constructor(props) {
super(props);
const { sites, n } = props;
this.state = { topSites: this.filterChartData(sites, n) };
this.handleChartClick = thi... |
docs/src/pages/components/toggle-button/StandaloneToggleButton.js | lgollut/material-ui | import React from 'react';
import CheckIcon from '@material-ui/icons/Check';
import ToggleButton from '@material-ui/lab/ToggleButton';
export default function StandaloneToggleButton() {
const [selected, setSelected] = React.useState(false);
return (
<ToggleButton
value="check"
selected={selected}
... |
src/components/similar-product/similar-product.js | SupasitC/Pricetrolley | import React from 'react'
import {Row, Col} from 'react-bootstrap'
import DealsBox from '../great-deals/deals-box'
export default class SimilarProduct extends React.Component {
render() {
const style = require('./similar-product.scss');
return (
<div className={style.SimilarProduct}>
<Row>
... |
src/svg-icons/hardware/laptop-windows.js | ichiohta/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareLaptopWindows = (props) => (
<SvgIcon {...props}>
<path d="M20 18v-1c1.1 0 1.99-.9 1.99-2L22 5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2v1H0v2h24v-2h-4zM4 5h16v10H4V5z"/>
</SvgIcon>
);
Hardwar... |
src/javascripts/App.js | zerosquadron/ticTacToe | import React, { Component } from 'react';
import './App.css';
class App extends Component {
render() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<h1 className="App-title">Welcome to React</h1>
</hea... |
node_modules/react-bootstrap/es/Radio.js | darklilium/Factigis_2 | import _extends from 'babel-runtime/helpers/extends';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from ... |
features/apimgt/org.wso2.carbon.apimgt.store.feature/src/main/resources/store/source/src/app/components/Base/index.js | dewmini/carbon-apimgt | /*
* Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/li... |
fields/components/DateInput.js | Freakland/keystone | import moment from 'moment';
import DayPicker from 'react-day-picker';
import React from 'react';
import Popout from '../../admin/src/components/Popout';
import { FormInput } from 'elemental';
function isSameDay(d1, d2) {
d1.setHours(0, 0, 0, 0);
d2.setHours(0, 0, 0, 0);
return d1.getTime() === d2.getTime();
}
m... |
packages/react-vis/src/plot/series/heatmap-series.js | uber-common/react-vis | // Copyright (c) 2016 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.