-
Notifications
You must be signed in to change notification settings - Fork 268
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Display Partially selected nodes ✨ (#73)
- Loading branch information
Showing
37 changed files
with
2,626 additions
and
706 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"spellright.language": "en", | ||
"spellright.documentTypes": [ | ||
"markdown", | ||
"latex", | ||
"plaintext", | ||
"javascript" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Snapshot report for `src\checkbox\index.test.js` | ||
|
||
The actual snapshot is saved in `index.test.js.snap`. | ||
|
||
Generated by [AVA](https://ava.li). | ||
|
||
## Checkbox component | ||
|
||
> Snapshot 1 | ||
<input | ||
className="sample" | ||
type="checkbox" | ||
/> | ||
|
||
## renders disabled state | ||
|
||
> Snapshot 1 | ||
<input | ||
disabled={true} | ||
type="checkbox" | ||
/> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"rules": { | ||
"no-console": 0 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,11 @@ | ||
html, body, #app { | ||
html, | ||
body, | ||
#app { | ||
height: 100%; | ||
} | ||
|
||
body { | ||
margin: 0; | ||
padding: 0; | ||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', Helvetica, Arial, sans-serif;; | ||
} | ||
|
||
.suspended .node-label { | ||
font-style: italic; | ||
text-decoration: line-through; | ||
} | ||
|
||
.dropdown-content { | ||
max-height: 400px; | ||
overflow-y: auto; | ||
} | ||
|
||
.node .fa { | ||
font-size: 12px; | ||
margin-left: 4px; | ||
cursor: pointer; | ||
} | ||
|
||
.node .fa-ban { | ||
color: darkorange; | ||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', Helvetica, Arial, sans-serif; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import React, { PureComponent } from 'react' | ||
import PropTypes from 'prop-types' | ||
|
||
class Checkbox extends PureComponent { | ||
state = {isChecked: this.props.checked || false} | ||
|
||
toggleCheckboxChange = () => { | ||
const { onChange, value } = this.props | ||
|
||
this.setState(({ isChecked }) => ({isChecked: !isChecked})) | ||
|
||
onChange(value) | ||
} | ||
|
||
render() { | ||
const { label, value } = this.props | ||
const { isChecked } = this.state | ||
|
||
return ( | ||
<div className="checkbox"> | ||
<label> | ||
<input type="checkbox" value={value} defaultChecked={isChecked} onChange={this.toggleCheckboxChange} /> | ||
{label} | ||
</label> | ||
</div> | ||
) | ||
} | ||
} | ||
|
||
Checkbox.propTypes = { | ||
label: PropTypes.string.isRequired, | ||
value: PropTypes.string.isRequired, | ||
onChange: PropTypes.func.isRequired, | ||
checked: PropTypes.bool | ||
} | ||
|
||
export default Checkbox |
Oops, something went wrong.