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:
@@ -12,13 +12,14 @@ interface Person {
|
||||
}
|
||||
|
||||
interface Props {
|
||||
limit?: number
|
||||
offset?: number
|
||||
title?: string
|
||||
class?: string
|
||||
}
|
||||
|
||||
const { limit = 10, offset = 0, title = 'Top users', class: className } = Astro.props
|
||||
const { class: className } = Astro.props
|
||||
|
||||
const limit = 10
|
||||
const offset = 0
|
||||
const title = 'Top users'
|
||||
|
||||
const colors = ['green', 'red', 'yellow', 'x', 'x'] as const
|
||||
const statusLabels: Record<(typeof colors)[number], string> = { green: 'Online', red: 'Busy', yellow: 'Away', x: 'Offline' }
|
||||
|
||||
Reference in New Issue
Block a user