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
15316676
Commit
15316676
authored
2 years ago
by
chris
Browse files
Options
Downloads
Patches
Plain Diff
button style
parent
91d4161b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
wax-prosemirror-components/src/components/various/LeftSideButton.js
+6
-3
6 additions, 3 deletions
...irror-components/src/components/various/LeftSideButton.js
with
6 additions
and
3 deletions
wax-prosemirror-components/src/components/various/LeftSideButton.js
+
6
−
3
View file @
15316676
...
...
@@ -2,6 +2,7 @@
import
React
,
{
useContext
,
useMemo
}
from
'
react
'
;
import
{
WaxContext
}
from
'
wax-prosemirror-core
'
;
import
styled
,
{
css
}
from
'
styled-components
'
;
import
{
th
,
override
}
from
'
@pubsweet/ui-toolkit
'
;
import
MenuButton
from
'
../../ui/buttons/MenuButton
'
;
const
activeStyles
=
css
`
...
...
@@ -32,9 +33,11 @@ const LeftSideButton = ({ view = {}, item }) => {
run
(
editorState
,
dispatch
);
};
const
isActive
=
!!
(
active
(
state
,
activeViewId
)
&&
select
(
state
,
activeViewId
)
);
// const isActive = !!(
// active(state, activeViewId) && select(state, activeViewId)
// );
const
isActive
=
!!
active
(
state
,
activeViewId
);
let
isDisabled
=
!
select
(
state
,
activeViewId
,
activeView
);
if
(
!
isEditable
)
isDisabled
=
true
;
...
...
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