+
-
-
+
+
+ {/* {error} */}
-
-
-
- {label}
-
-
>
),
)
diff --git a/src/components/ErrorMessage.tsx b/src/components/ErrorMessage.tsx
index b423e310..e9547274 100644
--- a/src/components/ErrorMessage.tsx
+++ b/src/components/ErrorMessage.tsx
@@ -1,16 +1,11 @@
import React, { ReactNode } from 'react'
-import Text from './Text'
interface ErrorMessageProps {
children: ReactNode
}
const ErrorMessage = ({ children }: ErrorMessageProps) => {
- return (
-
- {children}
-
- )
+ return
{children}
}
export default ErrorMessage
diff --git a/src/components/FacebookShareButton.tsx b/src/components/FacebookShareButton.tsx
index c46ca718..20de1a37 100644
--- a/src/components/FacebookShareButton.tsx
+++ b/src/components/FacebookShareButton.tsx
@@ -1,10 +1,7 @@
import React from 'react'
import { FaFacebook } from 'react-icons/fa'
-import Button, { ButtonProps } from './Button'
-import Link from './Link'
-import Text from './Text'
-
-export interface FacebookShareButton extends ButtonProps {
+import Button from './Button'
+export interface FacebookShareButton {
url?: string
}
@@ -13,14 +10,12 @@ const FacebookShareButton = ({ url = '', ...rest }: FacebookShareButton) => {
href += `&u=${encodeURIComponent(url)}`
return (
-
-
)
}
diff --git a/src/components/MultiSelect.tsx b/src/components/MultiSelect.tsx
index f80adfc6..238bd534 100644
--- a/src/components/MultiSelect.tsx
+++ b/src/components/MultiSelect.tsx
@@ -1,74 +1,71 @@
-import React, { forwardRef } from 'react'
+import React from 'react'
import Select from 'react-select'
-import { SelectProps } from 'types'
-import theme from '../theme'
-import { getMarginProps, omitMarginProps } from '../utils'
-import Box from './Box'
-import Text from './Text'
+import ErrorMessage from './ErrorMessage'
-export interface MultiSelectProps extends SelectProps {
+export interface MultiSelectProps {
label?: string
options: { label: string; value: string | number }[]
+ name: string
+ className?: string
+ error?: string
}
-const MultiSelect = forwardRef(
- ({ label, name, options, ...rest }: MultiSelectProps, ref) => (
-
- {label && (
-
- {label}
-
- )}
-
- ),
+const MultiSelect = ({
+ label,
+ name,
+ options,
+ className,
+ error,
+}: MultiSelectProps) => (
+
+ {label && (
+
+ )}
+
)
export default MultiSelect
diff --git a/src/components/MultiSelectCreatable.tsx b/src/components/MultiSelectCreatable.tsx
index 9a4dd430..0aabf5f5 100644
--- a/src/components/MultiSelectCreatable.tsx
+++ b/src/components/MultiSelectCreatable.tsx
@@ -1,25 +1,15 @@
-import React, {
- FocusEvent,
- forwardRef,
- KeyboardEventHandler,
- useEffect,
-} from 'react'
+import React, { FocusEvent, KeyboardEventHandler, useEffect } from 'react'
import { MultiValue } from 'react-select'
import CreatableSelect from 'react-select/creatable'
-import { SelectProps as SP } from 'types'
-import theme from '../theme'
-import { getMarginProps, omitMarginProps } from '../utils'
-import Box from './Box'
import ErrorMessage from './ErrorMessage'
-import Text from './Text'
interface Option {
readonly label: string
readonly value: string
}
-export interface MultiSelectCreatableProps
- extends Omit
{
+export interface MultiSelectCreatableProps {
+ name: string
label?: string
placeholder?: string
value: MultiValue