mirror of
https://github.com/koreanbots/core.git
synced 2025-12-16 06:20:24 +00:00
chore: renamed Label to Tag
This commit is contained in:
parent
dcc370c13e
commit
74b31b5060
@ -1,15 +0,0 @@
|
||||
import Link from 'next/link'
|
||||
|
||||
const Label = ({ href, text }:LabelProps):JSX.Element => {
|
||||
return href ? <Link href={href}>
|
||||
<a className='text-base bg-little-white dark:bg-discord-black text-black dark:text-gray-400 px-2 py-1 rounded mr-1 mb-1 hover:bg-little-white-hover dark:hover:bg-discord-dark-hover'>{text}</a>
|
||||
</Link> : <a className='text-base bg-little-white dark:bg-discord-black text-black dark:text-gray-400 px-2 py-1 rounded mr-1 mb-1'>{text}</a>
|
||||
}
|
||||
|
||||
interface LabelProps {
|
||||
href?: string
|
||||
text: string
|
||||
icon?: string
|
||||
}
|
||||
|
||||
export default Label
|
||||
18
components/Tag.tsx
Normal file
18
components/Tag.tsx
Normal file
@ -0,0 +1,18 @@
|
||||
import Link from 'next/link'
|
||||
|
||||
const Tag = ({ href, text, circular=false, dark=false, marginBottom=2 }:LabelProps):JSX.Element => {
|
||||
return href ? <Link href={href}>
|
||||
<a className={`text-base bg-little-white dark:bg-discord-black text-black dark:text-gray-400 ${circular ? 'rounded-3xl px-2.5 py-1.5' : 'rounded px-2 py-1'} mr-1 mb-${marginBottom} hover:bg-little-white-hover dark:hover:bg-discord-dark-hover`}>{text}</a>
|
||||
</Link> : <a className={`text-base ${dark ? 'bg-little-white-hover dark:bg-very-black' : 'bg-little-white dark:bg-discord-black'} text-black dark:text-gray-400 ${circular ? 'rounded-3xl px-2.5 py-1.5' : 'rounded px-2 py-1'} mr-1 mb-${marginBottom}`}>{text}</a>
|
||||
}
|
||||
|
||||
interface LabelProps {
|
||||
href?: string
|
||||
text: string | JSX.Element | JSX.Element[]
|
||||
icon?: string
|
||||
circular?: boolean
|
||||
dark?: boolean
|
||||
marginBottom?: number
|
||||
}
|
||||
|
||||
export default Tag
|
||||
Loading…
x
Reference in New Issue
Block a user