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 { useMemo } from "react"; | |
import { useSearchParams } from "react-router-dom"; | |
type ParseConfig = Record< | |
string, | |
| { type: "string"; defaultValue?: string } | |
| { type: "number"; defaultValue?: number } | |
| { parse: (value: URLSearchParams) => unknown } | |
>; |
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 Tabs from './Tabs'; | |
const TabsExample = () => ( | |
<Tabs> | |
<Tabs.Panel label='Tab label 1'> | |
<h4>Tab content 1</h4> | |
<p> | |
Disrupt minimum viable product pivot waterfall is so 2000 and | |
late viral long shadow cortado SpaceTeam unicorn venture |
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, { Component } from 'react'; | |
import PropTypes from 'prop-types'; | |
import styled from 'styled-components'; | |
import withRipple from './withRipple'; | |
const TabContent = styled.div` | |
flex: 1; | |
width: 100%; | |
`; |
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, { Component } from 'react'; | |
import PropTypes from 'prop-types'; | |
import styled, { keyframes } from 'styled-components'; | |
import { darken } from 'polished'; | |
import TextField from './TextField'; | |
const propTypes = { | |
onAuthSuccess: PropTypes.func.isRequired, | |
}; |
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, { Component } from 'react'; | |
import PropTypes from 'prop-types'; | |
import styled, { css } from 'styled-components'; | |
import { darken } from 'polished'; | |
const propTypes = { | |
label: PropTypes.string, | |
value: PropTypes.string.isRequired, | |
onChange: PropTypes.func.isRequired, | |
}; |
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 propTypes = { | |
label: PropTypes.string, | |
value: PropTypes.string.isRequired, | |
onChange: PropTypes.func.isRequired, | |
}; | |
class TextField extends Component { | |
state = { | |
isFocused: false, | |
} |
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
.toastAnimEnter, .toastAnimAppear { | |
opacity: 0.01; | |
transition: opacity .5s cubic-bezier(.03, .83, .76, .98); | |
} | |
.toastAnimEnter.toastAnimEnterActive, .toastAnimAppear.toastAnimAppearActive { | |
opacity: 1; | |
} | |
.toastAnimLeave { |
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 styled from 'styled-components'; | |
// TODO: allow overriding these via props | |
const errorColor = '#e02d2d'; | |
const errorColorDark = '#801313'; | |
const warnColor = '#ffc715'; | |
const warnColorDark = '#b78e0d'; | |
const successColor = '#22ce33'; | |
const successColorDark = '#14841f'; |
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 update from 'immutability-helper'; | |
import { createAction } from 'redux-actions'; | |
// Action types | |
export const TOAST_ADD_MESSAGE = 'TOAST_ADD_MESSAGE'; | |
export const TOAST_REMOVE_MESSAGE = 'TOAST_REMOVE_MESSAGE'; | |
export const initialState = { | |
messages: [], |
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, { Component, PropTypes } from 'react'; | |
import styled from 'styled-components'; | |
import { connect } from 'react-redux'; | |
import { bindActionCreators } from 'redux'; | |
import CSSTransitionGroup from 'react-transition-group/CSSTransitionGroup'; | |
import { addToast, removeToast, getToasts } from './ducks'; | |
// Components | |
import Toast from './components/Toast'; |
NewerOlder