-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from SparkleIdeas/dev
Update Obsidian Leaf view
- Loading branch information
Showing
16 changed files
with
431 additions
and
250 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1 @@ | ||
# obsidian-react-starter | ||
|
||
Code From Original Template: [React Starter](https://github.com/obsidian-community/obsidian-react-starter) | ||
|
||
A starter template for creating an [Obsidian](https://obsidian.md/) plugin with [ReactJS](https://reactjs.org/). | ||
|
||
## Features | ||
|
||
This project comes preconfigured with [Typescript](https://www.typescriptlang.org/), [Vite](https://vitejs.dev/) And [Less](https://lesscss.org/). | ||
|
||
## Getting Started | ||
|
||
Click "use this template" to create your own fork of this repo. Make sure to reference [the official sample plugin](https://github.com/obsidianmd/obsidian-sample-plugin) for information about how to get started with the Obsidian API and how to submit your plugin to the Community Plugin Gallery. | ||
|
||
```bash | ||
# for local development | ||
yarn install | ||
yarn dev | ||
|
||
# for a production bundle | ||
yarn install | ||
yarn build | ||
``` | ||
|
||
## Stats | ||
|
||
The production output of this sample plugin is **~50 KB**. | ||
Not Yet Usable |
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
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,26 @@ | ||
import * as React from 'react'; | ||
import TreeNode from "./TreeNode"; | ||
import { Tree } from "../../types/tree"; | ||
|
||
interface Props { | ||
style?: React.CSSProperties; | ||
childNodes: Tree[]; | ||
} | ||
|
||
const TreeChildren: React.FC<Props> = (props) => { | ||
const { childNodes, style } = props; | ||
let childNodeJSX; | ||
if (childNodes != null) { | ||
childNodeJSX = childNodes.map((node) => { | ||
return ( | ||
<li key={ node.uuid }> | ||
<TreeNode topBullet={ false } node={ node }/> | ||
</li> | ||
); | ||
}); | ||
} | ||
|
||
return (<ul style={ style }>{ childNodeJSX }</ul>); | ||
}; | ||
|
||
export default TreeChildren; |
Oops, something went wrong.