Skip to content

Commit e6979e2

Browse files
committed
feat(ui-truncate-text): migrate to new theming system
1 parent e7df3a7 commit e6979e2

3 files changed

Lines changed: 4 additions & 51 deletions

File tree

packages/ui-truncate-text/src/TruncateText/index.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@ import {
3232
ensureSingleChild
3333
} from '@instructure/ui-react-utils'
3434
import { logError as error } from '@instructure/console'
35-
import { withStyleRework as withStyle } from '@instructure/emotion'
35+
import { withStyle } from '@instructure/emotion'
3636

3737
import generateStyle from './styles'
38-
import generateComponentTheme from './theme'
3938

4039
import truncate from './utils/truncate'
4140
import { allowedProps, TruncateTextState } from './props'
@@ -46,7 +45,7 @@ import type { TruncateTextProps } from './props'
4645
category: components
4746
---
4847
**/
49-
@withStyle(generateStyle, generateComponentTheme)
48+
@withStyle(generateStyle)
5049
class TruncateText extends Component<TruncateTextProps, TruncateTextState> {
5150
static readonly componentId = 'TruncateText'
5251

packages/ui-truncate-text/src/TruncateText/styles.ts

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

25-
import type { TruncateTextTheme } from '@instructure/shared-types'
25+
import type { NewComponentTypes } from '@instructure/ui-themes'
2626
import type { TruncateTextStyle } from './props'
2727

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

packages/ui-truncate-text/src/TruncateText/theme.ts

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

0 commit comments

Comments
 (0)