Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
151
Issues
151
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
purescript-gargantext
Commits
18e3dbcc
Commit
18e3dbcc
authored
Apr 18, 2019
by
James Laver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move to use new DOM functions
parent
f9ff03e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
AnnotatedField.purs
src/Gargantext/Components/Annotated/AnnotatedField.purs
+3
-3
No files found.
src/Gargantext/Components/Annotated/AnnotatedField.purs
View file @
18e3dbcc
...
...
@@ -44,7 +44,7 @@ annotatedField = R.createLeaf annotatedFieldComponent
annotatedFieldComponent :: R.Component Props
annotatedFieldComponent = R.pureLeaf "AnnotatedField" cpt
where
cpt props = R
.createDOMElement "p"
{ className: "annotated-field" } $ children props
cpt props = R
DOM.p
{ className: "annotated-field" } $ children props
children props = A.fromFoldable (annotateRun <$> compile props)
type RunProps = ( list :: Maybe TermList, text :: String )
...
...
@@ -55,8 +55,8 @@ annotateRun (Tuple text list) = R.createLeaf annotatedRunComponent { text, list
annotatedRunComponent :: R.Component RunProps
annotatedRunComponent = R.pureLeaf "AnnotatedRun" cpt
where cpt { text, list } = maybe (unstyled text) (styled text) list
styled text list = R
.createDOMElement "span"
{ style: termStyle list } [ RDOM.text text ]
unstyled text = R
.createDOMElement "span"
{} [ RDOM.text text ]
styled text list = R
DOM.span
{ style: termStyle list } [ RDOM.text text ]
unstyled text = R
DOM.span
{} [ RDOM.text text ]
compile :: Record Props -> List Run
compile props = runs props.text
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment