index.tsx 654 B

123456789101112131415161718192021222324252627282930313233343536
  1. import React from 'react';
  2. import InputBox from '../InputBox';
  3. import Typography from '../Typography';
  4. import { ContentWrapper } from './styled';
  5. type Props = {
  6. t: (key: string) => string;
  7. onChange: (value: string) => void;
  8. value?: string;
  9. };
  10. const TextBox: React.FC<Props> = ({
  11. t,
  12. onChange,
  13. value,
  14. }: Props): React.ReactElement => (
  15. <>
  16. <ContentWrapper>
  17. <Typography variant="subtitle">{t('text')}</Typography>
  18. </ContentWrapper>
  19. <InputBox
  20. variant="multiline"
  21. onChange={onChange}
  22. value={value}
  23. shouldFitContainer
  24. />
  25. </>
  26. );
  27. TextBox.defaultProps = {
  28. value: '',
  29. };
  30. export default TextBox;