├── .storybook ├── addons.js ├── config.js ├── deploy-helper.js └── webpack.config.js ├── .prettierrc ├── src ├── typings │ └── modules.d.ts ├── __tests__ │ ├── __snapshots__ │ │ └── KeyDown.test.tsx.snap │ └── KeyDown.test.tsx ├── index.tsx ├── sass │ └── main.scss ├── KeyDown.tsx └── TreeMenu │ ├── __tests__ │ ├── renderProps.test.tsx │ ├── TreeMenu.test.tsx │ ├── walk.test.tsx │ └── __snapshots__ │ │ ├── renderProps.test.tsx.snap │ │ └── TreeMenu.test.tsx.snap │ ├── renderProps.tsx │ ├── walk.tsx │ └── index.tsx ├── stories ├── assets │ ├── closedIcon.png │ └── openedIcon.png └── index.stories.js ├── .babelrc ├── .prettierignore ├── jest.setup.js ├── .stylelintrc.json ├── .gitignore ├── tsconfig.json ├── jest.config.js ├── rollup.config.js ├── LICENSE ├── .circleci └── config.yml ├── package.json └── README.md /.storybook/addons.js: -------------------------------------------------------------------------------- 1 | import '@storybook/addon-actions/register'; 2 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "printWidth": 90, 4 | "trailingComma": "es5" 5 | } 6 | -------------------------------------------------------------------------------- /src/typings/modules.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'tiny-debounce'; 2 | declare module 'is-empty'; 3 | declare module '*.scss'; 4 | -------------------------------------------------------------------------------- /stories/assets/closedIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iannbing/react-simple-tree-menu/HEAD/stories/assets/closedIcon.png -------------------------------------------------------------------------------- /stories/assets/openedIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iannbing/react-simple-tree-menu/HEAD/stories/assets/openedIcon.png -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "@babel/preset-env", 4 | ["@babel/typescript", { "isTSX": true, "allExtensions": true }], 5 | "@babel/preset-react" 6 | ], 7 | "plugins": ["@babel/proposal-class-properties"] 8 | } 9 | -------------------------------------------------------------------------------- /src/__tests__/__snapshots__/KeyDown.test.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`KeyDown should render correctly 1`] = ` 4 |