diff --git a/src/assets/images/icon-cross-light.svg b/src/assets/images/icon-cross-light.svg
new file mode 100644
index 0000000..add82d0
--- /dev/null
+++ b/src/assets/images/icon-cross-light.svg
@@ -0,0 +1,30 @@
+
+
diff --git a/src/components/Button/index.jsx b/src/components/Button/index.jsx
index a9ca78b..509cf17 100644
--- a/src/components/Button/index.jsx
+++ b/src/components/Button/index.jsx
@@ -9,11 +9,12 @@ import styles from "./styles.module.scss";
* @param {Object} props component properties
* @param {Object} props.children button text
* @param {string} [props.className] class name added to root element
- * @param {'primary'|'primary-dark'|'primary-light'} [props.color] button color
+ * @param {'primary'|'primary-dark'|'primary-light'|'error'|'warning'} [props.color]
+ * button color
* @param {boolean} [props.isDisabled] if button is disabled
* @param {boolean} [props.isSelected] if button is selected
* @param {string} [props.name] button name
- * @param {(e: any) => void} props.onClick function called when button is clicked
+ * @param {(e: any) => void} [props.onClick] function called when button is clicked
* @param {'medium'|'small'} [props.size] button size
* @param {'circle'|'rounded'} [props.style] button style
* @param {'button'|'submit'|'reset'} [props.type] button type
@@ -42,13 +43,11 @@ const Button = ({
type={type}
className={cn(
styles.button,
- {
- [styles.selected]: isSelected,
- [styles[color]]: true,
- [styles[size]]: true,
- [styles[style]]: true,
- [styles[variant]]: true,
- },
+ styles[color],
+ styles[size],
+ styles[style],
+ styles[variant],
+ { [styles.selected]: isSelected },
className
)}
onClick={onClick}
@@ -60,7 +59,13 @@ const Button = ({
Button.propTypes = {
children: PT.node,
className: PT.string,
- color: PT.oneOf(["primary"]),
+ color: PT.oneOf([
+ "primary",
+ "primary-dark",
+ "primary-light",
+ "error",
+ "warning",
+ ]),
isDisabled: PT.bool,
isSelected: PT.bool,
name: PT.string,
diff --git a/src/components/Button/styles.module.scss b/src/components/Button/styles.module.scss
index 2ae6cd1..1cfbe34 100644
--- a/src/components/Button/styles.module.scss
+++ b/src/components/Button/styles.module.scss
@@ -7,6 +7,7 @@
align-items: center;
@include roboto-bold;
letter-spacing: 0.8px;
+ white-space: nowrap;
text-transform: uppercase;
outline: none;
cursor: pointer;
@@ -61,6 +62,16 @@
color: $primary-dark-text-color;
}
+ &.error {
+ border-color: $error-color;
+ color: $error-text-color;
+ }
+
+ &.warning {
+ border-color: $warning-color;
+ color: $warning-text-color;
+ }
+
&:disabled {
border-color: $control-disabled-border-color;
background-color: $control-disabled-bg-color;
@@ -88,6 +99,16 @@
background-color: $primary-dark-color;
}
+ &.error {
+ border-color: $error-color;
+ background-color: $error-color;
+ }
+
+ &.warning {
+ border-color: $warning-color;
+ background-color: $warning-color;
+ }
+
&:disabled {
border-color: $control-disabled-border-color;
background-color: $control-disabled-bg-color;
diff --git a/src/components/Checkbox/index.jsx b/src/components/Checkbox/index.jsx
index da21e84..10e4eb4 100644
--- a/src/components/Checkbox/index.jsx
+++ b/src/components/Checkbox/index.jsx
@@ -10,6 +10,7 @@ import styles from "./styles.module.scss";
* @param {Object} props component properties
* @param {boolean} props.checked whether checkbox is checked
* @param {string} [props.className] class name added to root element
+ * @param {string} [props.impostorClassName] class name added to checkbox impostor
* @param {boolean} [props.isDisabled] if checkbox is disabled
* @param {string} props.name name for input element
* @param {() => void} props.onChange function called when checkbox changes state
@@ -21,6 +22,7 @@ import styles from "./styles.module.scss";
const Checkbox = ({
checked,
className,
+ impostorClassName,
isDisabled = false,
name,
onChange,
@@ -47,7 +49,7 @@ const Checkbox = ({
checked={checked}
value={option ? option.value : ""}
/>
-
+
{option && option.label && (
{option.label}
)}
@@ -57,6 +59,7 @@ const Checkbox = ({
Checkbox.propTypes = {
checked: PT.bool,
className: PT.string,
+ impostorClassName: PT.string,
isDisabled: PT.bool,
name: PT.string.isRequired,
size: PT.oneOf(["medium", "small"]),
diff --git a/src/components/Checkbox/styles.module.scss b/src/components/Checkbox/styles.module.scss
index c07881a..b114fd2 100644
--- a/src/components/Checkbox/styles.module.scss
+++ b/src/components/Checkbox/styles.module.scss
@@ -96,7 +96,7 @@ input.checkbox {
z-index: 2;
position: relative;
display: inline-block;
- vertical-align: -2px;
+ vertical-align: -3px;
width: 15px;
height: 15px;
line-height: 13px;
diff --git a/src/components/Icons/ExclamationMarkCircled/index.jsx b/src/components/Icons/ExclamationMarkCircled/index.jsx
new file mode 100644
index 0000000..a7ac21f
--- /dev/null
+++ b/src/components/Icons/ExclamationMarkCircled/index.jsx
@@ -0,0 +1,20 @@
+import React from "react";
+import PT from "prop-types";
+import cn from "classnames";
+import styles from "./styles.module.scss";
+
+/**
+ * Displays a white exclamation mark inside red circle.
+ *
+ * @param {Object} props component properties
+ * @returns {JSX.Element}
+ */
+const ExclamationMarkCircled = (props) => (
+
+);
+
+ExclamationMarkCircled.propTypes = {
+ className: PT.string,
+};
+
+export default ExclamationMarkCircled;
diff --git a/src/components/Icons/ExclamationMarkCircled/styles.module.scss b/src/components/Icons/ExclamationMarkCircled/styles.module.scss
new file mode 100644
index 0000000..260762c
--- /dev/null
+++ b/src/components/Icons/ExclamationMarkCircled/styles.module.scss
@@ -0,0 +1,22 @@
+@import "styles/mixins";
+@import "styles/variables";
+
+.icon {
+ display: inline-block;
+ padding: 2px 0 0;
+ font-size: 12px;
+ width: 16px;
+ height: 16px;
+ border-radius: 8px;
+ line-height: 14px;
+ @include roboto-bold;
+ text-align: center;
+ background: $error-color;
+ color: #fff;
+ cursor: pointer;
+
+ &::before {
+ content: "!";
+ display: inline;
+ }
+}
diff --git a/src/components/Modal/index.jsx b/src/components/Modal/index.jsx
new file mode 100644
index 0000000..09ea934
--- /dev/null
+++ b/src/components/Modal/index.jsx
@@ -0,0 +1,95 @@
+import React from "react";
+import PT from "prop-types";
+import { Modal as ReactModal } from "react-responsive-modal";
+import Button from "components/Button";
+import IconCross from "../../assets/images/icon-cross-light.svg";
+import { stopImmediatePropagation } from "utils/misc";
+import styles from "./styles.module.scss";
+import "react-responsive-modal/styles.css";
+
+const classNames = {
+ modal: styles.modal,
+ modalContainer: styles.modalContainer,
+};
+const closeIcon =