mirror of
https://github.com/tabler/tabler.git
synced 2026-08-07 03:42:27 +04:00
575d68572f
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
9 lines
375 B
TypeScript
9 lines
375 B
TypeScript
/**
|
|
* Returns how many of the given prop keys are explicitly set (not undefined).
|
|
* Some components use this count as a class suffix when `size` (or similar) is
|
|
* omitted, e.g. `spinner-border-2` or `nav-2`.
|
|
*/
|
|
export function includeArgCount(props: Record<string, unknown>, keys: readonly string[]): number {
|
|
return keys.filter((k) => props[k] !== undefined).length
|
|
}
|