Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
wax-prosemirror
Manage
Activity
Members
Labels
Plan
Issues
34
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wax
wax-prosemirror
Commits
08c42709
Commit
08c42709
authored
4 years ago
by
Yannis Barlas
Browse files
Options
Downloads
Patches
Plain Diff
comment bubble ui
parent
696b7322
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!161
Connect ui
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
stories/comments/CommentBubble.stories.js
+12
-0
12 additions, 0 deletions
stories/comments/CommentBubble.stories.js
wax-prosemirror-components/src/ui/comments/CommentBubble.js
+56
-0
56 additions, 0 deletions
wax-prosemirror-components/src/ui/comments/CommentBubble.js
with
68 additions
and
0 deletions
stories/comments/CommentBubble.stories.js
0 → 100644
+
12
−
0
View file @
08c42709
import
React
from
'
react
'
;
import
CommentBubble
from
'
../../wax-prosemirror-components/src/ui/comments/CommentBubble
'
;
export
const
Base
=
()
=>
(
<
CommentBubble
onClick
=
{()
=>
console
.
log
(
'
clicked the bubble!
'
)}
/
>
);
export
default
{
component
:
CommentBubble
,
title
:
'
Comments/Comment Bubble
'
,
};
This diff is collapsed.
Click to expand it.
wax-prosemirror-components/src/ui/comments/CommentBubble.js
0 → 100644
+
56
−
0
View file @
08c42709
import
React
from
'
react
'
;
import
styled
from
'
styled-components
'
;
/**
* SVG source
* https://material.io/resources/icons/?search=chat&icon=chat&style=baseline
*/
const
Wrapper
=
styled
.
div
`
border-radius: 50%;
width: 40px;
height: 40px;
display: flex;
justify-content: center;
align-items: center;
transition: background 0.1s ease-in;
&:hover {
background: gainsboro;
cursor: pointer;
}
`
;
const
IconSVG
=
props
=>
{
const
{
className
}
=
props
;
return
(
<
svg
className
=
{
className
}
xmlns
=
"
http://www.w3.org/2000/svg
"
viewBox
=
"
0 0 24 24
"
>
<
path
d
=
"
M0 0h24v24H0z
"
fill
=
"
none
"
/>
<
path
d
=
"
M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 9h12v2H6V9zm8 5H6v-2h8v2zm4-6H6V6h12v2z
"
/>
<
/svg
>
);
};
const
Icon
=
styled
(
IconSVG
)
`
height: 28px;
width: 28px;
fill: gray;
`
;
const
Bubble
=
props
=>
{
const
{
onClick
}
=
props
;
return
(
<
Wrapper
onClick
=
{
onClick
}
>
<
Icon
/>
<
/Wrapper
>
);
};
export
default
Bubble
;
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment