How to use the @times-components/utils.capitalise function in @times-components/utils

To help you get started, we’ve selected a few @times-components/utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github newsuk / times-components / packages / button / src / button.web.js View on Github external
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>
  );
};
github newsuk / times-components / packages / button / src / button.js View on Github external
const Button = ({ fontSize, lineHeight, onPress, style, title }) =&gt; {
  const transformedTitle = capitalise(title);
  const fontSizeStyle = fontSize ? { fontSize } : null;
  const lineHeightStyle = lineHeight ? { lineHeight } : null;
  return (