Skip to content
Snippets Groups Projects
Commit d6e20cad authored by ahamelers's avatar ahamelers
Browse files

#281 wip annotation style

parent 3d3260eb
No related branches found
No related tags found
2 merge requests!60Dev,!56Shared data model
import React from 'react'
import annotator from 'annotator'
import styled from 'styled-components'
import { lighten } from '@pubsweet/ui-toolkit'
import AnnotatorStyle from './AnnotatorStyle'
const Annotate = styled.div`
*::selection {
background: ${lighten('colorWarning', 80)} !important;
}
*::-moz-selection {
background: ${lighten('colorWarning', 80)} !important;
}
`
const Annotator = BaseComponent =>
class AnnotatorDiv extends React.Component {
state = { app: null }
......@@ -87,12 +77,12 @@ const Annotator = BaseComponent =>
render() {
const { file, revId, userId, children, style, ...props } = this.props
return (
<Annotate className="annotator" ref={this.setRef} style={style}>
<div className="annotator" ref={this.setRef} style={style}>
<AnnotatorStyle />
<BaseComponent loaded={this.startAnnotator} url={file.url} {...props}>
{children}
</BaseComponent>
</Annotate>
</div>
)
}
}
......
......@@ -15,6 +15,12 @@ const AnnotatorStyles = createGlobalStyle`
font-size: ${th('fontSizeBaseSmall')} !important;
font-style: normal !important;
}
::selection {
background-color: ${lighten('colorWarning', 60)} !important;
}
::-moz-selection {
background-color: ${lighten('colorWarning', 60)} !important;
}
body {
/* Base Reset
-------------------------------------------------------------------- */
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment