A TruncateText component made by Instructure Inc.
The ui-truncate-text
package contains the following:
npm install @instructure/ui-truncate-text
---
example: false
---
import React from 'react'
import { TruncateText } from '@instructure/ui-truncate-text'
const MyTruncateText = () => {
return (
<TruncateText
position="middle"
truncate="word"
>
<span>This line of text should be truncated from the middle of the string <strong>instead of the end.</strong></span>
</TruncateText>
)
}