Skip to content

Instantly share code, notes, and snippets.

@ericmasiello
Created March 6, 2020 21:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ericmasiello/ed1f0e8598c23f5c9e9f3ae6ac3d2124 to your computer and use it in GitHub Desktop.
Save ericmasiello/ed1f0e8598c23f5c9e9f3ae6ac3d2124 to your computer and use it in GitHub Desktop.
import React from 'react';
function Title(props) {
const { as: Component, children } = props;
return <Component className="title">{children}</Component>
}
Title.defaultProps = {
as: 'h1',
};
export default Title;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment