Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const Button = ({ fontSize, lineHeight, onPress, style, title }) => {
const fontSizeStyle = fontSize ? { fontSize } : null;
const lineHeightStyle = lineHeight ? { lineHeight } : null;
const buttonStyles = {
...styles.button,
...style,
...fontSizeStyle,
...lineHeightStyle
};
return (
<button type="button" style="{buttonStyles}">
{capitalise(title)}
</button>
);
};
const Button = ({ fontSize, lineHeight, onPress, style, title }) => {
const transformedTitle = capitalise(title);
const fontSizeStyle = fontSize ? { fontSize } : null;
const lineHeightStyle = lineHeight ? { lineHeight } : null;
return (