feature & fix

deskripsi:
- fix Text input
- feature Box footer & button center
This commit is contained in:
2025-07-09 10:19:02 +08:00
parent 0698e14d36
commit 16559b94fe
27 changed files with 1284 additions and 71 deletions

View File

@@ -23,6 +23,7 @@ type Props = {
disabled?: boolean;
borderRadius?: number;
style?: StyleProp<ViewStyle>;
maxLength?: number;
} & Omit<React.ComponentProps<typeof RNTextInput>, "style">;
export const TextInputCustom = ({
@@ -38,6 +39,7 @@ export const TextInputCustom = ({
style,
keyboardType,
onChangeText,
maxLength,
...rest
}: Props) => {
const [isPasswordVisible, setIsPasswordVisible] = useState(false);
@@ -96,6 +98,7 @@ export const TextInputCustom = ({
secureTextEntry={secureTextEntry && !isPasswordVisible}
keyboardType={keyboardType}
onChangeText={handleTextChange}
maxLength={maxLength}
{...rest}
/>
{secureTextEntry && (

View File

@@ -1,5 +1,6 @@
// components/text-input.styles.ts
import { AccentColor, MainColor } from "@/constants/color-palet";
import { MainColor } from "@/constants/color-palet";
import { TEXT_SIZE_LARGE, TEXT_SIZE_MEDIUM } from "@/constants/constans-value";
import { StyleSheet } from "react-native";
export const textInputStyles = StyleSheet.create({
@@ -13,7 +14,7 @@ export const textInputStyles = StyleSheet.create({
fontSize: 14,
marginBottom: 6,
fontWeight: "500",
color: MainColor.white,
color: MainColor.white_gray,
},
// Tanda bintang merah untuk required
@@ -28,12 +29,18 @@ export const textInputStyles = StyleSheet.create({
color: MainColor.red,
},
// Input Length
inputLength: {
fontSize: 12,
color: MainColor.white_gray,
},
// Wrapper input (View pembungkus TextInput)
inputContainer: {
flexDirection: "row",
alignItems: "center",
borderWidth: 1,
borderColor: AccentColor.white,
borderColor: MainColor.white_gray,
backgroundColor: MainColor.white,
paddingHorizontal: 12,
height: 50,
@@ -48,7 +55,7 @@ export const textInputStyles = StyleSheet.create({
// Input utama (TextInput)
input: {
flex: 1,
fontSize: 16,
fontSize: TEXT_SIZE_MEDIUM,
paddingVertical: 0,
},
@@ -60,7 +67,7 @@ export const textInputStyles = StyleSheet.create({
// Teks ikon jika berupa string
iconText: {
fontSize: 16,
fontSize: TEXT_SIZE_LARGE,
color: "#000",
},
@@ -68,4 +75,11 @@ export const textInputStyles = StyleSheet.create({
errorBorder: {
borderColor: "red",
},
// Untuk TextArea tambahan
textArea: {
textAlignVertical: "top",
padding: 12,
height: undefined, // biar multiline bebas tinggi
},
});