Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit c862c57

Browse files
committed
Adds Modal and ErrorMessage components
(moved from Community App)
1 parent 100d3e3 commit c862c57

File tree

11 files changed

+265
-101
lines changed

11 files changed

+265
-101
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ __coverage__
22
.build-info
33
.sass-cache
44
dist
5-
node_modules
5+
node_modules
6+
topcoder-react-ui-kit-*.tgz

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Topcoder React UI Kit Changelog
22

3+
### v0.5.4
4+
Adds **Modal**, and **ErrorMessage** component.
5+
36
### v0.4.0
47
Update to the latest **topcoder-react-utils**, and also better way to pack
58
the library for release.

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ theming according to the TC UI Kit design specs.
5959

6060
- [**`Avatar`**](docs/avatar.md) — Themed avatar;
6161
- [**`Buttons`**](docs/buttons.md) — Themed buttons;
62+
- [**`ErrorMessage`**](docs/ErrorMessage.md) — Standard error message;
63+
- [**`Modal`**](docs/Modal.md) — Standard modal component;
6264
- [**`Tags`**](docs/tags.md) — Small tags for technologies, event types,
6365
etc. Technically, they are buttons styled in a different way.
6466

__tests__/__snapshots__/index.js.snap

+2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ Object {
1111
"DesignTrackTag": [Function],
1212
"DevelopmentTrackEventTag": [Function],
1313
"DevelopmentTrackTag": [Function],
14+
"ErrorMessage": [Function],
1415
"GhostButton": [Function],
16+
"Modal": [Function],
1517
"PrimaryButton": [Function],
1618
"SecondaryButton": [Function],
1719
"Tag": [Function],

docs/ErrorMessage.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# ErrorMessage
2+
3+
The standard error message (a modal).
4+
5+
_TODO: This document should be improved_
6+
7+
Import it as
8+
```js
9+
import { ErrorMessage } from 'topcoder-react-ui-kit';
10+
```
11+
12+
### Props
13+
14+
| Name | Type | Default | Description |
15+
| --- | --- | --- | --- |
16+
| title | String | | Error name (a brief description). |
17+
| details | String | Empty string| Optional. A more verbose description of the problem. |
18+
| onOk | Function | | Callback to trigger when user clicks _Ok_ button in the message.

docs/Modal.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Modal
2+
3+
Same as **Modal** from **topcoder-react-utils**, just a convenience alias,
4+
and also to guarantee necessary styling according to TC UI Kit.

0 commit comments

Comments
 (0)