Skip to content

Instantly share code, notes, and snippets.

@ericmasiello
Created March 6, 2020 21:36
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/0d7f88a1ad7d94648d58289b0dc9991b to your computer and use it in GitHub Desktop.
Save ericmasiello/0d7f88a1ad7d94648d58289b0dc9991b to your computer and use it in GitHub Desktop.
import React from 'react';
import Title from './Title';
export function SpecialButton(props) {
const { className, children } = props;
return (
<button onClick={() => alert('sup?')} className={className}>
{children}
</button>
);
}
export function SpecialButtonAsTitle(props) {
return (
<Title as={SpecialButton}>{props.children}</Title>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment