Auto-prettification
This commit is contained in:
parent
ac97e62f2e
commit
9815e7301f
|
@ -12,15 +12,19 @@ export function BountiedContractBadge() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function BountiedContractSmallBadge(props: { contract: Contract, showAmount?: boolean }) {
|
export function BountiedContractSmallBadge(props: {
|
||||||
|
contract: Contract
|
||||||
|
showAmount?: boolean
|
||||||
|
}) {
|
||||||
const { contract, showAmount } = props
|
const { contract, showAmount } = props
|
||||||
const { openCommentBounties } = contract
|
const { openCommentBounties } = contract
|
||||||
if (!openCommentBounties) return <div />
|
if (!openCommentBounties) return <div />
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tooltip text={CommentBountiesTooltipText(openCommentBounties)}>
|
<Tooltip text={CommentBountiesTooltipText(openCommentBounties)}>
|
||||||
<span className="bg-indigo-300 inline-flex cursor-default items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium text-white">
|
<span className="inline-flex cursor-default items-center gap-1 rounded-full bg-indigo-300 px-2 py-0.5 text-xs font-medium text-white">
|
||||||
<CurrencyDollarIcon className={'h3 w-3'} />{showAmount && formatMoney(openCommentBounties)} Bounty
|
<CurrencyDollarIcon className={'h3 w-3'} />
|
||||||
|
{showAmount && formatMoney(openCommentBounties)} Bounty
|
||||||
</span>
|
</span>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
)
|
)
|
||||||
|
|
|
@ -29,9 +29,7 @@ import { Button } from 'web/components/button'
|
||||||
import { MINUTE_MS } from 'common/util/time'
|
import { MINUTE_MS } from 'common/util/time'
|
||||||
import { useUser } from 'web/hooks/use-user'
|
import { useUser } from 'web/hooks/use-user'
|
||||||
import { Tooltip } from 'web/components/tooltip'
|
import { Tooltip } from 'web/components/tooltip'
|
||||||
import {
|
import { BountiedContractSmallBadge } from 'web/components/contract/bountied-contract-badge'
|
||||||
BountiedContractSmallBadge,
|
|
||||||
} from 'web/components/contract/bountied-contract-badge'
|
|
||||||
import { Row } from '../layout/row'
|
import { Row } from '../layout/row'
|
||||||
|
|
||||||
export function ContractTabs(props: {
|
export function ContractTabs(props: {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user