This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const B = (props) => <Text style={{fontWeight: "bold"}}>{props.children}</Text>; | |
// ... | |
<Text>This is a sentence <B>with</B> one word in bold</Text> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import ReactDOM from "react-dom"; | |
import DayPicker from "react-day-picker"; | |
import DayPickerInput from "react-day-picker/DayPickerInput"; | |
import "react-day-picker/lib/style.css"; | |
class Example extends React.Component { | |
state = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
data: { | |
pageTitle: 'VEELGESTELDE VRAGEN', | |
pageIconUuid: 'cd34154b-d009-44f8-81ae-0c080ccbb0a5', | |
questions: [ | |
{ | |
title: 'Faq title 1', | |
text: 'Faq description text 1', | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
data: { | |
headTitle: 'HOE WERKT?', | |
headText: 'HOE WERKT?HOE WERKT?HOE WERKT?HOE WERKT?', | |
headIconUuid: 'acef632f-e28f-44cd-bc6a-31a22d49f1f8', | |
videoUrl: 'https://www.youtube.com/watch?v=CIpOxa5hxOw', | |
steps: [ | |
{ | |
title: 'Step 1', | |
text: 'Step 1 long text', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var segments = [ | |
{ | |
value: 'content-partner', | |
type: 'STATIC', | |
part: 'PATH', | |
}, | |
{ | |
value: 'content partner name 111', | |
type: 'DYNAMIC', | |
entity: 'CONTENT_PARTNER', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {useCallback, useEffect, useState} from 'react'; | |
const useSwipeToDismiss = (ref, onDismiss, removeDOM = false, distanceBeforeDismiss = 100, direction = 'right') => { | |
const node = ref.current; | |
const [removing, setRemoving] = useState(false); | |
const [pressedPosition, setPressedPosition] = useState(false); | |
const [positionLeft, setPositionLeft] = useState(false); | |
const [animate, setAnimate] = useState(false); | |
const [opacity, setOpacity] = useState(1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import PropTypes from 'prop-types'; | |
import { findDOMNode } from 'react-dom'; | |
class SwipeToDismiss extends React.Component { | |
constructor(props) { | |
super(props); | |
this.node = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const MessageItem = ({message, onDismiss}) => { | |
const ref = useRef(null); | |
const swipeableMessageProps = useSwipeToDismiss(ref, onDismiss, false, 100, 'right'); | |
return <div ref={ref} className={'Message'} {...swipeableMessageProps}> | |
{message} | |
</div>; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useTodoListStore } from '../../store/TodoListStore'; | |
const TodoList = () => { | |
const { | |
tasks, | |
addTask, | |
renameTask, | |
removeTask, | |
} = useTodoListStore(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState, useCallback } from 'react'; | |
const Context = React.createContext(); | |
let nextId = 0; | |
export const TodoListProvider = ({children}) => { | |
const [tasks, setTasks] = useState([]); | |
const addTask = useCallback(name => setTasks(tasks => ([...tasks, {id: ++nextId, name}])), [setTasks]); |
OlderNewer