-
-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: adjust mrt_dentsitystate
according to the doc
#494
base: v2
Are you sure you want to change the base?
feat: adjust mrt_dentsitystate
according to the doc
#494
Conversation
@mr-pinzhang is attempting to deploy a commit to the Kevin Vandy OSS Team on Vercel. A member of the Team first needs to authorize it. |
@@ -13,7 +13,9 @@ interface Props<TData extends MRT_RowData> | |||
table: MRT_TableInstance<TData>; | |||
} | |||
|
|||
const next: Record<MRT_DensityState, MRT_DensityState> = { | |||
type TogglableDensityState = Exclude<MRT_DensityState, 'lg' | 'sm'>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am trying not to touch the density toggle
function here.
const defaultRowHeightByDensity: Record<MRT_DensityState, number> = { | ||
lg: 61, | ||
md: 53, | ||
sm: 45, | ||
xl: 69, | ||
xs: 37, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find this pattern by myself, noticing the row height increase by 8 per each density. let me know if I'm doing it in a wrong way.
const defaultRowHeightByDensity: Record<MRT_DensityState, number> = { | ||
lg: 62.7, | ||
md: 54.7, | ||
sm: 48.7, | ||
xl: 70.7, | ||
xs: 42.7, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure how this number gets calculated. from xs
to md,
it's a number gap of 12. For md
to xl,
it's 16. so I put 6+ for sm
, and 8+ for 'lg` here.
Hey MRT developers, this PR is made to adjust the definition of
type MRT_DensityState
to what we have on docs.