mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: add Flipcard component support with configuration and styling for enhanced interactivity
This commit is contained in:
parent
0b02bb4a76
commit
98dfad76aa
6 changed files with 465 additions and 0 deletions
|
|
@ -25,6 +25,7 @@ import {
|
|||
Lightbulb,
|
||||
Link2,
|
||||
MousePointerClick,
|
||||
RotateCw,
|
||||
Sigma,
|
||||
Table,
|
||||
Tag,
|
||||
|
|
@ -430,6 +431,24 @@ export const ToolbarButtons = ({ editor, props }: any) => {
|
|||
<Globe size={15} />
|
||||
</ToolBtn>
|
||||
</ToolTip>
|
||||
<ToolTip content={'Flipcard'}>
|
||||
<ToolBtn
|
||||
onClick={() =>
|
||||
editor.chain().focus().insertContent({
|
||||
type: 'flipcard',
|
||||
attrs: {
|
||||
question: 'Click to reveal the answer',
|
||||
answer: 'This is the answer',
|
||||
color: 'blue',
|
||||
alignment: 'center',
|
||||
size: 'medium'
|
||||
}
|
||||
}).run()
|
||||
}
|
||||
>
|
||||
<RotateCw size={15} />
|
||||
</ToolBtn>
|
||||
</ToolTip>
|
||||
</ToolButtonsWrapper>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue