You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
1.5 KiB

5 months ago
  1. import React from 'react';
  2. import {StyleProp, Text, TextStyle, ViewStyle} from 'react-native';
  3. import {ColorScheme} from './Design';
  4. export default function EText(props: {
  5. children: React.ReactNode;
  6. style?: StyleProp<TextStyle>;
  7. }) {
  8. return (
  9. <Text
  10. style={[
  11. {
  12. fontFamily: 'Pretendard-Regular',
  13. fontSize: 15,
  14. color: ColorScheme.fill[10],
  15. },
  16. props.style,
  17. ]}>
  18. {props.children}
  19. </Text>
  20. );
  21. }
  22. export function ETitleText(props: {
  23. children: React.ReactNode;
  24. style?: StyleProp<TextStyle>;
  25. }) {
  26. return (
  27. <Text
  28. style={[
  29. {
  30. fontFamily: 'Pretendard-SemiBold',
  31. fontSize: 24,
  32. color: ColorScheme.fill[10],
  33. },
  34. props.style,
  35. ]}>
  36. {props.children}
  37. </Text>
  38. );
  39. }
  40. export function ELabelText(props: {
  41. children: React.ReactNode;
  42. style?: StyleProp<TextStyle>;
  43. }) {
  44. return (
  45. <Text
  46. style={[
  47. {fontFamily: 'Pretendard-SemiBold', fontSize: 15, color: 'white'},
  48. props.style,
  49. ]}>
  50. {props.children}
  51. </Text>
  52. );
  53. }
  54. export function ECaptionText(props: {
  55. children: React.ReactNode;
  56. error?: boolean;
  57. style?: StyleProp<TextStyle>;
  58. }) {
  59. return (
  60. <Text
  61. style={[
  62. {
  63. fontFamily: 'Pretendard-Regular',
  64. fontSize: 12,
  65. color: props.error ? ColorScheme.critical.text : ColorScheme.fill[20],
  66. },
  67. props.style,
  68. ]}>
  69. {props.children}
  70. </Text>
  71. );
  72. }