Skip to content
This repository was archived by the owner on Sep 29, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,15 @@ import { Button, Form, FormGroup, Input, Label } from '@afconsult/apollo';
3. Use the components:

```jsx
const Example = () => {
return (
<Form>
<FormGroup>
<Label for="example">Example Input</Label>
<Input id="example" placeholder="Inser text here.." />
</FormGroup>
<Button type="submit">Submit</Button>
</Form>
);
};
const Example = () => (
<Form>
<FormGroup>
<Label for="example">Example Input</Label>
<Input id="example" placeholder="Inser text here.." />
</FormGroup>
<Button type="submit">Submit</Button>
</Form>
);
```

### Components
Expand Down
14 changes: 5 additions & 9 deletions src/components/Alert/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,11 @@
import React from 'react';
import { Alert } from '@afconsult/apollo';

export default class Example extends React.PureComponent {
render() {
return (
<Alert color="danger">
<b>Server offline.</b> We are working on solving this issue.
</Alert>
);
}
}
const Example = () => (
<Alert color="danger">
<b>Server offline.</b> We are working on solving this issue.
</Alert>
);
```

#### Props
Expand Down
18 changes: 7 additions & 11 deletions src/components/Avatar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,13 @@ Avatars are used to display a thumbnail of an individual.
import React from 'react';
import { Avatar } from '@afconsult/apollo';

export default class Example extends React.PureComponent {
render() {
return (
<Avatar
name="Willow Mcdonald"
size="x-small"
src="http://via.placeholder.com/400x400"
/>
);
}
}
const Example = () => (
<Avatar
name="Willow Mcdonald"
size="x-small"
src="http://via.placeholder.com/400x400"
/>
);
```

#### Props
Expand Down
16 changes: 6 additions & 10 deletions src/components/Badge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,12 @@
import React from 'react';
import { Badge } from '@afconsult/apollo';

export default class Example extends React.PureComponent {
render() {
return (
<div>
<Badge>Group</Badge>
<Badge color="secondary">Project</Badge>
</div>
);
}
}
const Example = () => (
<React.Fragment>
<Badge>Group</Badge>
<Badge color="secondary">Project</Badge>
</React.Fragment>
);
```

#### Props
Expand Down
1 change: 0 additions & 1 deletion src/components/BasicDropdown/README.md

This file was deleted.

18 changes: 7 additions & 11 deletions src/components/Breadcrumbs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,13 @@
import React from 'react';
import { Breadcrumbs, Breadcrumb } from '@afconsult/apollo';

export default class Example extends React.PureComponent {
render() {
return (
<Breadcrumbs>
<Breadcrumb>first</Breadcrumb>
<Breadcrumb>second</Breadcrumb>
<Breadcrumb active>active</Breadcrumb>
</Breadcrumbs>
);
}
}
const Example = () => (
<Breadcrumbs>
<Breadcrumb>first</Breadcrumb>
<Breadcrumb>second</Breadcrumb>
<Breadcrumb active>active</Breadcrumb>
</Breadcrumbs>
);
```

#### Props [Breadcrumbs](./)
Expand Down
22 changes: 9 additions & 13 deletions src/components/Button/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,15 @@
import React from 'react';
import { Button } from '@afconsult/apollo';

export default class Example extends React.PureComponent {
render() {
return (
<div>
<Button color="primary">primary</Button>
<Button color="secondary">secondary</Button>
<Button color="success">success</Button>
<Button color="danger">danger</Button>
<Button color="link">link</Button>
</div>
);
}
}
const Example = () => (
<React.Fragment>
<Button color="primary">primary</Button>
<Button color="secondary">secondary</Button>
<Button color="success">success</Button>
<Button color="danger">danger</Button>
<Button color="link">link</Button>
</React.Fragment>
);
```

#### Props
Expand Down
1 change: 0 additions & 1 deletion src/components/ButtonGroup/README.md

This file was deleted.

1 change: 0 additions & 1 deletion src/components/Collapse/README.md

This file was deleted.

1 change: 0 additions & 1 deletion src/components/Container/README.md

This file was deleted.

62 changes: 25 additions & 37 deletions src/components/Form/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,55 +6,43 @@
import React from 'react';
import { Form, FormGroup, Label, Input } from '@afconsult/apollo';

export default class Example extends React.PureComponent {
render() {
return (
<Form>
<FormGroup>
<Label for="form_example">Valid</Label>
<Input id="form_example" placeholder="Text" />
</FormGroup>
</Form>
);
}
}
const Example = () => (
<Form>
<FormGroup>
<Label for="form_example">Valid</Label>
<Input id="form_example" placeholder="Text" />
</FormGroup>
</Form>
);
```

```jsx
import React from 'react';
import { Form, FormGroup, Label, Input } from '@afconsult/apollo';

export default class Example extends React.PureComponent {
render() {
return (
<Form inline>
<FormGroup>
<Label for="form_inline_example">Valid</Label>
<Input id="form_inline_example" placeholder="Text" />
</FormGroup>
</Form>
);
}
}
const Example = () => (
<Form inline>
<FormGroup>
<Label for="form_inline_example">Valid</Label>
<Input id="form_inline_example" placeholder="Text" />
</FormGroup>
</Form>
);
```

```jsx
import React from 'react';
import { Form, FormGroup, FormFeedback, Label, Input } from '@afconsult/apollo';

export default class Example extends React.PureComponent {
render() {
return (
<Form>
<FormGroup>
<Label for="form_feedback_example">Valid</Label>
<Input id="form_feedback_example" placeholder="Text" />
<FormFeedback valid>Hurray! Something worked.</FormFeedback>
</FormGroup>
</Form>
);
}
}
const Example = () => (
<Form>
<FormGroup>
<Label for="form_feedback_example">Valid</Label>
<Input id="form_feedback_example" placeholder="Text" />
<FormFeedback valid>Hurray! Something worked.</FormFeedback>
</FormGroup>
</Form>
);
```

#### Props
Expand Down
1 change: 0 additions & 1 deletion src/components/FormFeedback/README.md

This file was deleted.

1 change: 0 additions & 1 deletion src/components/FormGroup/README.md

This file was deleted.

1 change: 0 additions & 1 deletion src/components/FormText/README.md

This file was deleted.

1 change: 0 additions & 1 deletion src/components/Icon/README.md

This file was deleted.

16 changes: 6 additions & 10 deletions src/components/Jumbotron/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,12 @@
import React from 'react';
import { Jumbotron } from '@afconsult/apollo';

const Example extends React.PureComponent {
render() {
return (
<Jumbotron>
<h1>Lorem ipsum dolor</h1>
<p>Put a bird on it ethical fanny pack shoreditch la croix.</p>
</Jumbotron>
);
}
}
const Example = () => (
<Jumbotron>
<h1>Lorem ipsum dolor</h1>
<p>Put a bird on it ethical fanny pack shoreditch la croix.</p>
</Jumbotron>
);
```

#### Props
Expand Down
6 changes: 1 addition & 5 deletions src/components/Loader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@ Loader component is a wrapper of [React Lottie](https://www.npmjs.com/package/re
import React from 'react';
import { Loader } from '@afconsult/apollo';

export default class Example extends React.PureComponent {
render() {
return <Loader width={25} height={25} />;
}
}
const Example = () => <Loader width={25} height={25} />;
```

#### Props
Expand Down
10 changes: 1 addition & 9 deletions src/components/Mention/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,7 @@
import React from 'react';
import { Mention } from '@afconsult/apollo';

const Example extends React.PureComponent {
render() {
return (
<Mention>
Stockholm
</Mention>
);
}
}
const Example = () => <Mention>Stockholm</Mention>;
```

#### Props
Expand Down
2 changes: 1 addition & 1 deletion src/components/Modal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The Modal component pass the `onToggle` prop via context to the [ModalHeader](..
import React from 'react';
import { Modal, ModalBody, ModalHeader, ModalFooter } from '@afconsult/apollo';

export default class Example extends React.Component {
class Example extends React.Component {
constructor(props) {
super(props);
this.state = { open: false };
Expand Down
1 change: 0 additions & 1 deletion src/components/Nav/README.md

This file was deleted.

1 change: 0 additions & 1 deletion src/components/NavItem/README.md

This file was deleted.

1 change: 0 additions & 1 deletion src/components/NavLink/README.md

This file was deleted.

1 change: 0 additions & 1 deletion src/components/Navbar/README.md

This file was deleted.

1 change: 0 additions & 1 deletion src/components/NavbarBrand/README.md

This file was deleted.

1 change: 0 additions & 1 deletion src/components/NavbarToggle/README.md

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/Tag/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
### Example

```jsx
const Example extends React.Component {
class Example extends React.Component {
constructor(props) {
super(props);
this.state = { open: true };
Expand Down