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
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Grégoire Locqueville
purescript-gargantext
Commits
766eac60
Commit
766eac60
authored
Apr 18, 2019
by
James Laver
Committed by
Alexandre Delanoë
Apr 28, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move to use new DOM functions
parent
6e7406ac
Changes
1
Show 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 @
766eac60
...
...
@@ -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