Skip to content

Commit 19734f7

Browse files
committed
feat(ui-list): migrate to new theming system
1 parent 61cbf4d commit 19734f7

File tree

9 files changed

+12
-210
lines changed

9 files changed

+12
-210
lines changed

packages/ui-list/src/InlineList/InlineListItem/index.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,9 @@ import { Component } from 'react'
2626

2727
import { View } from '@instructure/ui-view'
2828
import { passthroughProps } from '@instructure/ui-react-utils'
29-
30-
import { withStyleRework as withStyle } from '@instructure/emotion'
29+
import { withStyle } from '@instructure/emotion'
3130

3231
import generateStyle from './styles'
33-
import generateComponentTheme from './theme'
34-
3532
import { allowedProps } from './props'
3633
import type { InlineListItemProps } from './props'
3734

@@ -41,7 +38,7 @@ parent: InlineList
4138
id: InlineList.Item
4239
---
4340
**/
44-
@withStyle(generateStyle, generateComponentTheme)
41+
@withStyle(generateStyle)
4542
class InlineListItem extends Component<InlineListItemProps> {
4643
static readonly componentId = 'InlineList.Item'
4744

packages/ui-list/src/InlineList/InlineListItem/styles.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
import { logError as error } from '@instructure/console'
2626

27-
import type { InlineListItemTheme } from '@instructure/shared-types'
27+
import type { NewComponentTypes } from '@instructure/ui-themes'
2828
import type { InlineListItemProps, InlineListItemStyle } from './props'
2929

3030
/**
@@ -40,7 +40,7 @@ import type { InlineListItemProps, InlineListItemStyle } from './props'
4040
* @return {Object} The final style object, which will be used in the component
4141
*/
4242
const generateStyle = (
43-
componentTheme: InlineListItemTheme,
43+
componentTheme: NewComponentTypes['InlineListInlineListItem'],
4444
props: InlineListItemProps
4545
): InlineListItemStyle => {
4646
const { size, delimiter, spacing } = props

packages/ui-list/src/InlineList/InlineListItem/theme.ts

Lines changed: 0 additions & 72 deletions
This file was deleted.

packages/ui-list/src/List/ListItem/index.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,9 @@ import { Component } from 'react'
2626

2727
import { View } from '@instructure/ui-view'
2828
import { passthroughProps } from '@instructure/ui-react-utils'
29-
30-
import { withStyleRework as withStyle } from '@instructure/emotion'
29+
import { withStyle } from '@instructure/emotion'
3130

3231
import generateStyle from './styles'
33-
import generateComponentTheme from './theme'
34-
3532
import { allowedProps } from './props'
3633
import type { ListItemProps } from './props'
3734

@@ -41,7 +38,7 @@ parent: List
4138
id: List.Item
4239
---
4340
**/
44-
@withStyle(generateStyle, generateComponentTheme)
41+
@withStyle(generateStyle)
4542
class ListItem extends Component<ListItemProps> {
4643
static readonly componentId = 'List.Item'
4744

packages/ui-list/src/List/ListItem/styles.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
*/
2424

2525
import { logError as error } from '@instructure/console'
26-
27-
import type { ListItemTheme } from '@instructure/shared-types'
26+
import type { NewComponentTypes } from '@instructure/ui-themes'
2827
import type { ListItemProps, ListItemStyle } from './props'
2928

3029
/**
@@ -40,7 +39,7 @@ import type { ListItemProps, ListItemStyle } from './props'
4039
* @return {Object} The final style object, which will be used in the component
4140
*/
4241
const generateStyle = (
43-
componentTheme: ListItemTheme,
42+
componentTheme: NewComponentTypes['ListListItem'],
4443
props: ListItemProps
4544
): ListItemStyle => {
4645
const { size, delimiter, spacing } = props

packages/ui-list/src/List/ListItem/theme.ts

Lines changed: 0 additions & 68 deletions
This file was deleted.

packages/ui-list/src/List/index.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,10 @@ import { Children, Component, ReactElement } from 'react'
2626

2727
import { View } from '@instructure/ui-view'
2828
import { passthroughProps, safeCloneElement } from '@instructure/ui-react-utils'
29+
import { withStyle } from '@instructure/emotion'
2930

3031
import { ListItem } from './ListItem'
31-
32-
import { withStyleRework as withStyle } from '@instructure/emotion'
33-
3432
import generateStyle from './styles'
35-
import generateComponentTheme from './theme'
36-
3733
import { allowedProps } from './props'
3834
import type { ListProps } from './props'
3935

@@ -42,7 +38,7 @@ import type { ListProps } from './props'
4238
category: components
4339
---
4440
**/
45-
@withStyle(generateStyle, generateComponentTheme)
41+
@withStyle(generateStyle)
4642
class List extends Component<ListProps> {
4743
static readonly componentId = 'List'
4844

packages/ui-list/src/List/styles.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
* SOFTWARE.
2323
*/
2424

25-
import type { ListTheme } from '@instructure/shared-types'
2625
import type { ListProps, ListStyle } from './props'
26+
import type { NewComponentTypes } from '@instructure/ui-themes'
2727

2828
/**
2929
* ---
@@ -36,7 +36,7 @@ import type { ListProps, ListStyle } from './props'
3636
* @return {Object} The final style object, which will be used in the component
3737
*/
3838
const generateStyle = (
39-
componentTheme: ListTheme,
39+
componentTheme: NewComponentTypes['List'],
4040
props: ListProps
4141
): ListStyle => {
4242
const { isUnstyled, as } = props

packages/ui-list/src/List/theme.ts

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)