Skip to content

Instantly share code, notes, and snippets.

@michal-wrzosek
Created February 5, 2020 20:53
Show Gist options
  • Save michal-wrzosek/cc987ce4dbecea102e6b831ca746b3c8 to your computer and use it in GitHub Desktop.
Save michal-wrzosek/cc987ce4dbecea102e6b831ca746b3c8 to your computer and use it in GitHub Desktop.
import React from 'react';
import cntl from 'cntl';
const buttonCN = ({ isRed }: { isRed: boolean }) => cntl`
hover:bg-blue-700
text-white
font-bold
py-2
px-4
rounded
focus:outline-none
focus:shadow-outline
${
isRed
? cntl`
bg-red-500
`
: cntl`
bg-blue-500
`
}
`;
const Button = ({ isRed }: { isRed: boolean }) => <div className={buttonCN({ isRed })}>Click me</div>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment