How to truncate text on a button variant as link #1302
-
Hi Team, Is it possible to use truncate on a button text? To give some context, we are building a timeline view and want to display labels/SID as ticks that are clickable and would show a modal on click. If label/name is not available, we show the SID and would like to truncate the SID so it doesn't go over the chart. Here is a codesandbox trying to use truncate on button text |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Got it by moving the box inside the button component. Closing this. |
Beta Was this translation helpful? Give feedback.
-
Hi @sivapriya-k, Glad you figured this one out. Here's a possible alternative approach: https://codesandbox.io/s/truncate-button-text-dj80w. The |
Beta Was this translation helpful? Give feedback.
Got it by moving the box inside the button component. Closing this.