feat: fixes and formatter
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import Dialog from "react-native-dialog";
|
||||
|
||||
export const Container = Dialog.Container;
|
||||
export const Button = Dialog.Button;
|
||||
export const Title = Dialog.Title;
|
||||
export const Input = Dialog.Input;
|
||||
export const Description = Dialog.Description;
|
||||
import Dialog from 'react-native-dialog'
|
||||
|
||||
export const Container = Dialog.Container
|
||||
export const Button = Dialog.Button
|
||||
export const Title = Dialog.Title
|
||||
export const Input = Dialog.Input
|
||||
export const Description = Dialog.Description
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
import React from "react";
|
||||
import { Text, View } from "react-native";
|
||||
import React from 'react'
|
||||
import { Text, View } from 'react-native'
|
||||
|
||||
import { Input as MinuitInput } from "../Input";
|
||||
import { BaseButton as MinuitButton } from "../Button";
|
||||
import Overlay from "../Overlay";
|
||||
import { Input as MinuitInput } from '../Input'
|
||||
import { BaseButton as MinuitButton } from '../Button'
|
||||
import Overlay from '../Overlay'
|
||||
|
||||
import { Fonts, Palette, gutters } from "../../styles";
|
||||
import Style from "../../styles/Style";
|
||||
import { Fonts, Palette, gutters } from '../../styles'
|
||||
import Style from '../../styles/Style'
|
||||
|
||||
export const Container = ({ visible, setVisible = () => null, children }) => {
|
||||
return (
|
||||
<Overlay isVisible={visible}>
|
||||
<View style={{ ...Style.containerModal }}>{children}</View>
|
||||
</Overlay>
|
||||
);
|
||||
};
|
||||
)
|
||||
}
|
||||
|
||||
export const Title = ({ children }) => {
|
||||
return (
|
||||
<Text
|
||||
style={{
|
||||
...Fonts({
|
||||
type: "title",
|
||||
type: 'title',
|
||||
style: {
|
||||
textAlign: "center",
|
||||
textAlign: 'center',
|
||||
marginBottom: gutters,
|
||||
},
|
||||
}),
|
||||
@@ -31,17 +31,17 @@ export const Title = ({ children }) => {
|
||||
>
|
||||
{children}
|
||||
</Text>
|
||||
);
|
||||
};
|
||||
)
|
||||
}
|
||||
|
||||
export const Description = ({ children }) => {
|
||||
return (
|
||||
<Text
|
||||
style={{
|
||||
...Fonts({
|
||||
type: "default",
|
||||
type: 'default',
|
||||
style: {
|
||||
textAlign: "center",
|
||||
textAlign: 'center',
|
||||
marginBottom: gutters / 2,
|
||||
},
|
||||
}),
|
||||
@@ -49,29 +49,24 @@ export const Description = ({ children }) => {
|
||||
>
|
||||
{children}
|
||||
</Text>
|
||||
);
|
||||
};
|
||||
)
|
||||
}
|
||||
|
||||
export const Button = ({
|
||||
label,
|
||||
onPress,
|
||||
type = "primary",
|
||||
containerStyle = {},
|
||||
}) => {
|
||||
export const Button = ({ label, onPress, type = 'primary', containerStyle = {} }) => {
|
||||
return (
|
||||
<MinuitButton
|
||||
containerStyle={{
|
||||
width: "100%",
|
||||
alignSelf: "center",
|
||||
width: '100%',
|
||||
alignSelf: 'center',
|
||||
...containerStyle,
|
||||
}}
|
||||
text={label}
|
||||
onPress={onPress}
|
||||
type={type}
|
||||
/>
|
||||
);
|
||||
};
|
||||
)
|
||||
}
|
||||
|
||||
export const Input = (props) => {
|
||||
return <MinuitInput {...props} setValue={props.onChangeText} />;
|
||||
};
|
||||
return <MinuitInput {...props} setValue={props.onChangeText} />
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user