From f0dcd556ad8d733e0bb2a6213d12ffa2c245c3c4 Mon Sep 17 00:00:00 2001 From: "@wwwjim" Date: Thu, 16 Jul 2020 10:41:49 -0700 Subject: [PATCH] design system: cleanup, adds license --- LICENSE-MIT | 19 +++++++ components/core/ApplicationHeader.js | 2 +- components/system/SystemPage.js | 41 +++++---------- pages/system/index.js | 77 +++++++++++++--------------- 4 files changed, 69 insertions(+), 70 deletions(-) create mode 100644 LICENSE-MIT diff --git a/LICENSE-MIT b/LICENSE-MIT new file mode 100644 index 00000000..72dc60d8 --- /dev/null +++ b/LICENSE-MIT @@ -0,0 +1,19 @@ +The MIT License (MIT) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/components/core/ApplicationHeader.js b/components/core/ApplicationHeader.js index c3f95e65..dabfffe7 100644 --- a/components/core/ApplicationHeader.js +++ b/components/core/ApplicationHeader.js @@ -49,12 +49,12 @@ const STYLES_ICON_ELEMENT = css` `; const STYLES_ICON_ELEMENT_CUSTOM = css` + background-color: ${Constants.system.brand}; height: 48px; width: 48px; display: inline-flex; align-items: center; justify-content: center; - background-color: ${Constants.system.black}; user-select: none; cursor: pointer; `; diff --git a/components/system/SystemPage.js b/components/system/SystemPage.js index 64d85b3c..bc79e40d 100644 --- a/components/system/SystemPage.js +++ b/components/system/SystemPage.js @@ -24,16 +24,12 @@ const STYLES_BODY = css` const STYLES_ICON_ELEMENT = css` height: 88px; width: 88px; - border-radius: 88px; display: inline-flex; align-items: center; justify-content: center; background-color: ${Constants.system.brand}; color: ${Constants.system.white}; user-select: none; - background-image: url("/public/static/cube_f7f7f7.jpg"); - background-size: cover; - background-position: 50% 50%; `; const STYLES_SIDEBAR = css` @@ -189,35 +185,35 @@ export default class SystemPage extends React.Component {
Experiences - - + + @@ -254,16 +250,7 @@ export default class SystemPage extends React.Component {
{ - window.open("https://filscan.io/"); - }} style={{ marginTop: 48 }} - > - - Block Explorer -
-
{ window.open("https://github.com/filecoin-project/slate"); }} diff --git a/pages/system/index.js b/pages/system/index.js index 01760e31..6f671f33 100644 --- a/pages/system/index.js +++ b/pages/system/index.js @@ -76,6 +76,40 @@ export default class SystemPageRoot extends React.Component { {`import { ButtonPrimary } from 'slate-react-system' const Component = () => Hello World`} + +
+
+ And easily integrate Powergate
+
+ + {`import * as React from 'react'; +import * as System from 'slate-react-system'; +import { createPow } from "@textile/powergate-client"; + +class Example extends React.Component { + _PG = null; + + state = { + token: null + } + + _handleCreateToken = () => { + this._PG = createPow({ host: 'http://0.0.0.0:6002' }); + const FFS = await this._PG.ffs.create(); + const token = FFS.token ? FFS.token : null; + PowerGate.setToken(token); + this.setState({ token }); + } + + render() { + return ( + + ); + } +} +`}

@@ -106,48 +140,7 @@ const Component = () => Hello World`} . -


- How do I use Slate? -
- - If you are running this{" "} - - repository locally - - , visit https://localhost:1337 in your browser. If you are redirected - here, that means you have not followed all of the instructions or - something went wrong on our end. - -
-
-
- License -
- - Copyright © 2020 Protocol Labs -
-
- Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: -
-
- The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. -
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -
+

); }