Skip to content

Commit 340767e

Browse files
authored
Merge pull request #1 from ryanlanciaux/addStorybook
Adds Storybook and initial Toolbar component
2 parents e58be48 + 9ef80f8 commit 340767e

27 files changed

+12837
-0
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*.log
2+
.DS_Store
3+
node_modules
4+
.cache
5+
dist

.storybook/main.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
module.exports = {
2+
stories: ['../stories/**/*.stories.(ts|tsx)'],
3+
addons: ['@storybook/addon-actions', '@storybook/addon-links', '@storybook/addon-docs'],
4+
webpackFinal: async (config) => {
5+
config.module.rules.push({
6+
test: /\.(ts|tsx)$/,
7+
use: [
8+
{
9+
loader: require.resolve('ts-loader'),
10+
options: {
11+
transpileOnly: true,
12+
},
13+
},
14+
{
15+
loader: require.resolve('react-docgen-typescript-loader'),
16+
},
17+
],
18+
});
19+
20+
config.resolve.extensions.push('.ts', '.tsx');
21+
22+
return config;
23+
},
24+
};

LICENSE

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Copyright (c) 2016, nteract contributors
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted provided that the following conditions are met:
6+
7+
* Redistributions of source code must retain the above copyright notice, this
8+
list of conditions and the following disclaimer.
9+
10+
* Redistributions in binary form must reproduce the above copyright notice,
11+
this list of conditions and the following disclaimer in the documentation
12+
and/or other materials provided with the distribution.
13+
14+
* Neither the name of nteract nor the names of its
15+
contributors may be used to endorse or promote products derived from
16+
this software without specific prior written permission.
17+
18+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
22+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
# ui-refresh
22

33
This repository is a playground for the React compoennts compromising the new nteract UI. These components will be moved into the monorepo once they are ready for integration into the desktop app.
4+
5+
## Getting started
6+
7+
The main way to interact with this repository is through Storybook[https://storybook.js.org/]. To start Storybook, run `npm run storybook` (or `yarn storybook`). The Component workspace will run by default on port 6006. Storybook should automatically launch, but if it does not, you can view the workspace at http://localhost:6006. This functionality also is under the `start` script, instead of the default build & watch.
8+

bundle.css

Whitespace-only changes.

package.json

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"version": "0.1.0",
3+
"license": "BSD-3-Clause",
4+
"main": "dist/index.js",
5+
"typings": "dist/index.d.ts",
6+
"files": [
7+
"dist",
8+
"src"
9+
],
10+
"engines": {
11+
"node": ">=10"
12+
},
13+
"scripts": {
14+
"start": "start-storybook -p 6006",
15+
"build": "tsdx build",
16+
"test": "tsdx test --passWithNoTests",
17+
"lint": "tsdx lint",
18+
"prepare": "tsdx build",
19+
"storybook": "start-storybook -p 6006",
20+
"build-storybook": "build-storybook"
21+
},
22+
"peerDependencies": {
23+
"react": ">=16"
24+
},
25+
"husky": {
26+
"hooks": {
27+
"pre-commit": "tsdx lint"
28+
}
29+
},
30+
"prettier": {
31+
"printWidth": 80,
32+
"semi": true,
33+
"singleQuote": true,
34+
"trailingComma": "es5"
35+
},
36+
"name": "ui-refres",
37+
"author": "nteract contributors",
38+
"module": "dist/ui-refres.esm.js",
39+
"devDependencies": {
40+
"@babel/core": "^7.9.6",
41+
"@storybook/addon-actions": "^5.3.18",
42+
"@storybook/addon-docs": "^5.3.18",
43+
"@storybook/addon-info": "^5.3.18",
44+
"@storybook/addon-links": "^5.3.18",
45+
"@storybook/addons": "^5.3.18",
46+
"@storybook/react": "^5.3.18",
47+
"@types/react": "^16.9.34",
48+
"@types/react-dom": "^16.9.7",
49+
"babel-loader": "^8.1.0",
50+
"husky": "^4.2.5",
51+
"react": "^16.13.1",
52+
"react-docgen-typescript-loader": "^3.7.2",
53+
"react-dom": "^16.13.1",
54+
"react-is": "^16.13.1",
55+
"ts-loader": "^7.0.2",
56+
"tsdx": "^0.13.2",
57+
"tslib": "^1.11.1",
58+
"typescript": "^3.8.3"
59+
},
60+
"dependencies": {
61+
"@rollup/plugin-image": "^2.0.4",
62+
"@types/classnames": "^2.2.10",
63+
"classnames": "^2.2.6",
64+
"rollup-plugin-css-only": "^2.0.0"
65+
}
66+
}

src/Toolbar/Path.png

224 Bytes
Loading

src/Toolbar/Rectangle.png

315 Bytes
Loading

src/Toolbar/Shape.png

381 Bytes
Loading

src/Toolbar/Toolbar.css

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
.toolbar {
2+
position: relative;
3+
overflow: none;
4+
display: flex;
5+
align-items: center;
6+
justify-content: space-between;
7+
background-color: rgba(255,255,255,0);
8+
box-sizing: border-box;
9+
box-shadow: none;
10+
width: 100%;
11+
height: 40px;
12+
padding: 24px 0;
13+
14+
transition-property: height background-color box-shadow;
15+
transition-duration: 500ms;
16+
transition-timing-function: ease;
17+
}
18+
19+
.toolbar > span {
20+
display: flex;
21+
justify-content: space-between;
22+
width: 600px;
23+
}
24+
25+
.toolbar.expanded {
26+
height: 120px;
27+
background-color: #FFF;
28+
box-shadow: 0px 2px 8px rgba(41, 49, 58, 0.15);
29+
}

0 commit comments

Comments
 (0)