A React-based design system for internal TED projects.
yarn add @tedconf/react-ted-bootstrap
react-ted-bootstrap
requires your project have the follow peer dependencies installed:
@emotion/core
react
react-dom
Alert
Button
Container
DataTable
Dropdown
Gear
Input
Navbar
NavFlaps
NavToggle
Select
Spinner
TwistDown
import { Alert } from '@tedconf/react-ted-bootstrap';
const MyComponent = () => (
<Alert type="warning" onClose={onClose}>
My Alert
</Alert>
)
import { Button } from '@tedconf/react-ted-bootstrap';
const MyComponent = () => (
<Button>
My Button
</Button>
)
Bootstrap's .container
equivalent
import { Container } from '@tedconf/react-ted-bootstrap';
const MyComponent = () => (
<Container>
// your code here..
</Container>
)
import { DataTable } from '@tedconf/react-ted-bootstrap';
const MyComponent = () => (
<DataTable headings={headings} rows={rows} onSort={sort} />
)
import { Dropdown } from '@tedconf/react-ted-bootstrap';
const MyComponent = () => (
<Dropdown options={options} onClick={click} />
)
import { Gear } from '@tedconf/react-ted-bootstrap';
const MyComponent = () => (
<Gear>
<Gear.Item>
<a href="https://ted.com">TED.com</a>
</Gear.Item>
</Gear>
)
import { Input } from '@tedconf/react-ted-bootstrap';
const MyComponent = () => (
<Input
type="text"
placeholder="Text input"
onChange={onChange}
onFocus={onFocus}
onBlur={onBlur}
/>
)
import { Navbar } from '@tedconf/react-ted-bootstrap';
const MyComponent = () => (
<Navbar title="Bootstrap" onClick={click} />
)
import { NavFlaps, Tab } from '@tedconf/react-ted-bootstrap';
const MyComponent = () => (
<NavFlaps>
<Tab label="Tab 1" content={<ComponentOne />} />
<Tab label="Tab 2" content={<ComponentTwo />} />
</NavFlaps>
)
import { NavFlaps, Tab } from '@tedconf/react-ted-bootstrap';
const MyComponent = () => (
<NavToggle label="TED2019">
<a href="https://ted2019.ted.com">TED2019</a>
<a href="https://ted2019.ted.com">TED2020</a>
</NavToggle>
)
import { Select } from '@tedconf/react-ted-bootstrap';
const MyComponent = () => (
<Select label="My Select" onChange={change}>
<Select.Item value="value">Select Item</Select.Item>
</Select>
)
import { Spinner } from '@tedconf/react-ted-bootstrap';
const MyComponent = () => (
<Spinner />
)
import { TwistDown } from '@tedconf/react-ted-bootstrap';
const MyComponent = () => (
<TwistDown label="twistdown">My TwistDown Content</TwistDown>
)