feature & fix
deskripsi: - fix Text input - feature Box footer & button center
This commit is contained in:
29
components/Button/ButtonCenteredOnly.tsx
Normal file
29
components/Button/ButtonCenteredOnly.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import { MainColor } from "@/constants/color-palet";
|
||||
import { ICON_SIZE_BUTTON } from "@/constants/constans-value";
|
||||
import { GStyles } from "@/styles/global-styles";
|
||||
import { Feather } from "@expo/vector-icons";
|
||||
import React from "react";
|
||||
import ButtonCustom from "./ButtonCustom";
|
||||
|
||||
interface ButtonCenteredOnlyProps {
|
||||
children?: React.ReactNode;
|
||||
icon?: "plus" | "upload";
|
||||
onPress: () => void;
|
||||
}
|
||||
export default function ButtonCenteredOnly({
|
||||
onPress,
|
||||
children,
|
||||
icon = "plus"
|
||||
}: ButtonCenteredOnlyProps) {
|
||||
return (
|
||||
<ButtonCustom
|
||||
onPress={onPress}
|
||||
iconLeft={
|
||||
<Feather name={icon} size={ICON_SIZE_BUTTON} color={MainColor.black} />
|
||||
}
|
||||
style={[GStyles.buttonCentered50Percent]}
|
||||
>
|
||||
{children}
|
||||
</ButtonCustom>
|
||||
);
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
// components/Button/buttonStyles.js
|
||||
|
||||
import { MainColor } from "@/constants/color-palet";
|
||||
import { TEXT_SIZE_MEDIUM } from "@/constants/constans-value";
|
||||
import { StyleSheet } from "react-native";
|
||||
|
||||
export default function buttonStyles({
|
||||
@@ -21,7 +22,7 @@ export default function buttonStyles({
|
||||
},
|
||||
buttonText: {
|
||||
color: textColor,
|
||||
fontSize: 16,
|
||||
fontSize: TEXT_SIZE_MEDIUM,
|
||||
fontWeight: "600",
|
||||
},
|
||||
disabled: {
|
||||
|
||||
Reference in New Issue
Block a user