-
Notifications
You must be signed in to change notification settings - Fork 106
[v12] feat(ui-list): List rework #2308
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
base: v12
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,7 +24,7 @@ | |
|
|
||
| import { logError as error } from '@instructure/console' | ||
|
|
||
| import type { InlineListItemTheme } from '@instructure/shared-types' | ||
| import type { NewComponentTypes } from '@instructure/ui-themes' | ||
| import type { InlineListItemProps, InlineListItemStyle } from './props' | ||
|
|
||
| /** | ||
|
|
@@ -40,7 +40,7 @@ import type { InlineListItemProps, InlineListItemStyle } from './props' | |
| * @return {Object} The final style object, which will be used in the component | ||
| */ | ||
| const generateStyle = ( | ||
| componentTheme: InlineListItemTheme, | ||
| componentTheme: NewComponentTypes['InlineListInlineListItem'], | ||
| props: InlineListItemProps | ||
| ): InlineListItemStyle => { | ||
|
Comment on lines
42
to
45
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see a marginBottomDefault token in InlineListInlineListItem which I don't see here.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The marginBottomDefault token will not be used, and the designers have already removed it in the latest version. |
||
| const { size, delimiter, spacing } = props | ||
|
|
||
This file was deleted.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
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.
Is there any particular reason why you're extracting props in the index.ts files?
Uh oh!
There was an error while loading. Please reload this page.
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.
This ensures that only the necessary props are passed to the theme.ts file for style generation. Similar to ui-rating, I think this is a clean and effective approach.
Uh oh!
There was an error while loading. Please reload this page.
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.
@git-nandor I checked it and I cannot see a smiliar approach in ui-rating?