Skip to content

Commit

Permalink
refactor(editor): add ToolbarMenu export and clean up styles
Browse files Browse the repository at this point in the history
- Added export for ToolbarMenu in main.ts
- Removed unnecessary console.log in advice-view.tsx
- Updated background image in editor.css for b3-color-bg-red
  • Loading branch information
phodal committed Sep 23, 2024
1 parent 82b6eb3 commit f6fdd22
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions web/core/lib/editor/editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
font-size: 1.6rem;
line-height: 1.4;
}

a {
color: #1abc9c;
text-decoration: none;
Expand Down Expand Up @@ -254,7 +254,7 @@
}

.b3-color-bg-red {
background-color: #da4167;
background-image: linear-gradient(74deg, rgb(66, 133, 244) 0px, rgb(155, 114, 203) 9%, rgb(217, 101, 112) 20%, rgb(217, 101, 112) 24%, rgb(155, 114, 203) 35%, rgb(66, 133, 244) 44%, rgb(155, 114, 203) 50%, rgb(217, 101, 112) 56%, rgb(19, 19, 20) 75%, rgb(19, 19, 20) 100%)
}

.b3-color-purple {
Expand Down Expand Up @@ -553,4 +553,4 @@
.node-quick-command {
width: 720px;
margin: 0 auto;
}
}
5 changes: 2 additions & 3 deletions web/core/lib/editor/extensions/advice/advice-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const AdviceView = ({ editor }: AdviceViewProps) => {
}, []);

return <section
className='flex flex-col border w-96 h-screen border-slate-200 bg-gray-50 dark:bg-gray-400 lg:flex md:hidden sm:hidden hidden'
className='flex flex-col border w-96 h-screen border-slate-200 lg:flex md:hidden sm:hidden hidden'
ref={advicesSectionRef}>
{advices.length ? (advices.map(advice => (
<div
Expand Down Expand Up @@ -78,7 +78,6 @@ export const AdviceView = ({ editor }: AdviceViewProps) => {
<button
className='rounded-md bg-white/10 px-2.5 py-1.5 text-sm font-semibold text-white shadow-sm hover:bg-white/20'
onClick={() => {
console.log(advice.content)
editor.commands?.replaceRange(advice.content)
setActiveId(null)
editor.commands.unsetAdvice(advice.id)
Expand All @@ -94,4 +93,4 @@ export const AdviceView = ({ editor }: AdviceViewProps) => {
) : (<span className='pt-8 text-center text-slate-400 w-96'>No advices yet</span>)
}
</section>
}
}
3 changes: 2 additions & 1 deletion web/core/lib/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export * from "@/editor/live-editor";

export {
extensions,

default as LiveEditor
} from "@/editor/live-editor";

export { ToolbarMenu } from "@/editor/menu/toolbar-menu";

0 comments on commit f6fdd22

Please sign in to comment.