ohmyform-ui/components/styled/textarea.input.tsx
Michael Schramm 8713c0a8c6 - ability to change user passwords
- add default page background
- add environment list in [doc](doc/environment.md)
- combined notificationts to become more versatile
- use exported hooks for graphql
- links at the bottom for new users
- fixes for hide contrib setting
- upgrad all packages
2021-05-02 12:43:55 +02:00

50 lines
1.4 KiB
TypeScript

import { Input } from 'antd'
import { TextAreaProps } from 'antd/lib/input/TextArea'
import React from 'react'
import styled from 'styled-components'
import { FormPublicDesignFragment } from '../../graphql/fragment/form.public.fragment'
import { transparentize } from './color.change'
interface Props extends TextAreaProps {
design: FormPublicDesignFragment
}
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-assignment
const Field = styled(Input.TextArea)`
color: ${(props: Props) => props.design.colors.answer};
border-color: ${(props: Props) => props.design.colors.answer};
background: none !important;
border-right: none;
border-top: none;
border-left: none;
border-radius: 0;
:focus {
outline: none;
box-shadow: none;
border-color: ${(props: Props) => props.design.colors.answer};
}
:hover,
:active {
border-color: ${(props: Props) => props.design.colors.answer};
}
input {
background: none !important;
color: ${(props: Props) => props.design.colors.answer};
::placeholder {
color: ${(props: Props) => transparentize(props.design.colors.answer, 60)};
}
}
.anticon {
color: ${(props: Props) => props.design.colors.answer};
}
`
export const StyledTextareaInput: React.FC<Props> = ({ children, ...props }) => {
return <Field {...props}>{children}</Field>
}