mirror of
https://github.com/tabler/tabler.git
synced 2026-08-29 13:21:29 +04:00
Narrow component prop types, remove unused props and dead code (#2838)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -4,18 +4,14 @@ import Icon from './Icon.astro'
|
||||
interface Props {
|
||||
text?: string
|
||||
top?: boolean
|
||||
left?: boolean
|
||||
bottom?: boolean
|
||||
bookmark?: boolean
|
||||
color?: string
|
||||
filled?: boolean
|
||||
}
|
||||
|
||||
const { text, top, left, bottom, bookmark, color, filled } = Astro.props
|
||||
const { text, top, color } = Astro.props
|
||||
|
||||
const classes = ['ribbon', top && 'ribbon-top', left && 'ribbon-start', bottom && 'ribbon-bottom', bookmark && 'ribbon-bookmark', color && `bg-${color}`]
|
||||
const classes = ['ribbon', top && 'ribbon-top', color && `bg-${color}`]
|
||||
---
|
||||
|
||||
<div class:list={classes}>
|
||||
{text ? text : <Icon name="star" type={filled ? 'filled' : 'outline'} />}
|
||||
{text ? text : <Icon name="star" />}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user