Make tweet button smaller

This commit is contained in:
jahooma 2022-01-04 16:47:56 -06:00
parent 6d97b82aee
commit 67007c5897
3 changed files with 14 additions and 10 deletions

View File

@ -114,7 +114,9 @@ export function ContractDetails(props: {
<div className="whitespace-nowrap">{formatMoney(truePool)} pool</div>
</Row>
{inlineTags && <div className="hidden sm:block"></div>}
{inlineTags && tags.length > 0 && (
<div className="hidden sm:block"></div>
)}
<Row className="gap-2 flex-wrap">
{tags.map((tag) => (

View File

@ -68,6 +68,7 @@ export const ContractOverview = (props: {
/>
<ContractDetails contract={contract} inlineTags />
<TweetButton tweetText={tweetText} />
</Col>
<ResolutionOrChance
@ -80,10 +81,6 @@ export const ContractOverview = (props: {
<Spacer h={4} />
<TweetButton tweetText={tweetText} />
<Spacer h={4} />
<ContractProbGraph contract={contract} />
<Spacer h={12} />

View File

@ -1,9 +1,14 @@
export function TweetButton(props: { tweetText?: string }) {
const { tweetText } = props
import clsx from 'clsx'
export function TweetButton(props: { className?: string; tweetText?: string }) {
const { tweetText, className } = props
return (
<a
className="btn btn-sm normal-case self-start border-none"
className={clsx(
'btn btn-xs normal-case self-start border-none',
className
)}
style={{ backgroundColor: '#1da1f2' }}
href={`https://twitter.com/intent/tweet?text=${encodeURIComponent(
tweetText ?? ''
@ -13,8 +18,8 @@ export function TweetButton(props: { tweetText?: string }) {
<img
className="mr-2"
src={'/twitter-icon-white.svg'}
width={18}
height={18}
width={15}
height={15}
/>
Tweet
</a>