Skip to content

Commit

Permalink
widget updated
Browse files Browse the repository at this point in the history
  • Loading branch information
n4ze3m committed Jul 7, 2023
1 parent fd1aa3f commit aa32165
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.github
docker
docker
dev.bat
dev.sh
2 changes: 1 addition & 1 deletion app/widget/.env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# this is for local development environment
VITE_API_URL=http://localhost:3000/bot=
VITE_API_URL=http://localhost:3000/bot
83 changes: 83 additions & 0 deletions app/widget/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,90 @@ function App() {
</code>
);
},
a({ node, ...props }) {
return (
<a
target="_blank"
rel="noreferrer"
className="text-blue-500 hover:underline"
{...props}
>
{props.children}
</a>
);
},
li({ node, ...props }) {
return (
<li className="list-decimal marker:text-gray-500" {...props}>
{props.children}
</li>
);
},
ul({ node, ...props }) {
return (
<ul className="mx-2" {...props}>
{props.children}
</ul>
);
},
ol({ node, ...props }) {
return (
<ul className="mx-2" {...props}>
{props.children}
</ul>
);
},
h1({ node, ...props }) {
return (
<h1 className="text-2xl font-bold" {...props}>
{props.children}
</h1>
);
},
h2({ node, ...props }) {
return (
<h2 className="text-xl font-bold" {...props}>
{props.children}
</h2>
);
},
h3({ node, ...props }) {
return (
<h3 className="text-lg font-bold" {...props}>
{props.children}
</h3>
);
},
h4({ node, ...props }) {
return (
<h4 className="text-base font-bold" {...props}>
{props.children}
</h4>
);
},
h5({ node, ...props }) {
return (
<h5 className="text-sm font-bold" {...props}>
{props.children}
</h5>
);
},
h6({ node, ...props }) {
return (
<h6 className="text-xs font-bold" {...props}>
{props.children}
</h6>
);
},
p({ node, ...props }) {
return (
<p className="text-sm" {...props}>
{props.children}
</p>
);
}
}}

>
{message.message}
</ReactMarkdown>
Expand Down

0 comments on commit aa32165

Please sign in to comment.