Freshworks crayons

Hi everyone,

I was trying to add a detailed text message in crayons toast message.In which I wanted to display my messages in new line.

For Example :“successfully triggered. I have worked on projects”. Here I want the line “I have worked on projects” to be displayed in a new line instead of showing it in same line. To do this I tried using “\n” which didn’t worked out.
I have shared some screen shots for reference.

.

It will be much helpful ,If anyone knows the solution for this. Thanks in advance

Can you try using the line break html element

Find the example below

import { ToastContainer, toast } from '@crayons/toast';

function MyComponent() {
  const handleClick = () => {
    toast.success(
      <div>
        successfully triggered.
        <br />
        I have worked on projects.
      </div>
    );
  };

  return (
    <div>
      <button onClick={handleClick}>Show Toast</button>
      <ToastContainer />
    </div>
  );
}

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.