Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement new Sidebar #49

Merged
merged 11 commits into from
May 20, 2022
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap" rel="stylesheet">
<style>
@font-face {
font-family: 'Monument';
Expand Down
19,461 changes: 9,213 additions & 10,248 deletions package-lock.json

Large diffs are not rendered by default.

27 changes: 14 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,32 +37,33 @@
"@babel/eslint-parser": "^7.17.0",
"@babel/preset-env": "^7.17.12",
"@babel/preset-react": "^7.17.12",
"@storybook/addon-actions": "^6.4.22",
"@storybook/addon-docs": "^6.4.22",
"@storybook/addon-essentials": "^6.4.22",
"@storybook/addon-interactions": "^6.4.22",
"@storybook/addon-links": "^6.4.22",
"@storybook/builder-webpack5": "^6.4.22",
"@storybook/manager-webpack5": "^6.4.22",
"@storybook/node-logger": "^6.4.22",
"@storybook/addon-actions": "^6.5.3",
"@storybook/addon-docs": "^6.5.3",
"@storybook/addon-essentials": "^6.5.3",
"@storybook/addon-interactions": "^6.5.3",
"@storybook/addon-links": "^6.5.3",
"@storybook/builder-webpack5": "^6.5.3",
"@storybook/manager-webpack5": "^6.5.3",
"@storybook/node-logger": "^6.5.3",
"@storybook/preset-create-react-app": "^4.1.0",
"@storybook/react": "^6.4.22",
"@storybook/react": "^6.5.3",
"@storybook/testing-library": "^0.0.11",
"@types/styled-components": "^5.1.25",
"@typescript-eslint/eslint-plugin": "^5.24.0",
"@typescript-eslint/parser": "^5.24.0",
"@typescript-eslint/eslint-plugin": "^5.25.0",
"@typescript-eslint/parser": "^5.25.0",
"babel-loader": "^8.2.5",
"eslint": "^8.15.0",
"eslint-config-pluralsh": "^3.1.0",
"react-scripts": "5.0.1",
"react-router-dom": "^6.3.0",
"rimraf": "^3.0.2",
"typescript": "^4.6.4"
},
"peerDependencies": {
"honorable": ">=0.88.0",
"honorable-theme-default": ">=0.47.0",
"@emotion/react": "*",
"@emotion/styled": "*",
"honorable": ">=0.92.0",
"honorable-theme-default": ">=0.48.0",
"react": ">=16.0.0",
"react-dom": ">=16.0.0"
}
Expand Down
Binary file added public/plural-logo-white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/plural-logo-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/plural-logotype-white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/plural-logotype-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/components/Avatar.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Avatar from './Avatar'
import { Avatar } from 'honorable'

export default {
title: 'Avatar',
Expand Down Expand Up @@ -28,7 +28,7 @@ ComplexName.args = {
export const Image = Template.bind({})

Image.args = {
imageUrl: 'https://avatars.githubusercontent.com/u/4154003?v=4',
src: 'https://avatars.githubusercontent.com/u/4154003?v=4',
}

export const Small = Template.bind({})
Expand Down
70 changes: 0 additions & 70 deletions src/components/Avatar.tsx

This file was deleted.

6 changes: 4 additions & 2 deletions src/components/Icons.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import ArrowTopRightIcon from './icons/ArrowTopRightIcon'
import BotIcon from './icons/BotIcon'
import BrowserIcon from './icons/BrowserIcon'
import BundleIcon from './icons/BundleIcon'
Expand Down Expand Up @@ -42,7 +43,7 @@ import InvoicesIcon from './icons/InvoicesIcon'
import KeyIcon from './icons/KeyIcon'
import KeyPairIcon from './icons/KeyPairIcon'
import LifePreserverIcon from './icons/LifePreserverIcon'
import LightingIcon from './icons/LightingIcon'
import LightningIcon from './icons/LightningIcon'
import LinkoutIcon from './icons/LinkoutIcon'
import LinksIcon from './icons/LinksIcon'
import ListIcon from './icons/ListIcon'
Expand Down Expand Up @@ -89,6 +90,7 @@ import VolumesIcon from './icons/VolumesIcon'
import WebhooksIcon from './icons/WebhooksIcon'

const icons = {
ArrowTopRightIcon,
BotIcon,
BrowserIcon,
BundleIcon,
Expand Down Expand Up @@ -133,7 +135,7 @@ const icons = {
KeyIcon,
KeyPairIcon,
LifePreserverIcon,
LightingIcon,
LightningIcon,
LinkoutIcon,
LinksIcon,
ListIcon,
Expand Down
25 changes: 21 additions & 4 deletions src/components/Sidebar.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ function Template(args: any) {
createItem({
name: 'User Attributes',
Icon: ScrollIcon,
url: '/user-attributes',
}),
createItem({
name: 'Password',
Expand Down Expand Up @@ -257,6 +258,13 @@ function Template(args: any) {
>
Go to /explore/public
</button>
<button
type="button"
style={{ marginTop: '1rem' }}
onClick={() => setActiveUrl('/user-attributes')}
>
Go to /user-attributes
</button>
</Flex>
</Flex>
)
Expand All @@ -265,8 +273,17 @@ function Template(args: any) {
export const Default = Template.bind({})

Default.args = {
user: {
name: 'Jane Smith',
email: '[email protected]',
},
userName: 'Jane Smith',
userOrganization: 'Plural',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should probably keep the naming here in line with the api, which has it as account not organization

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, np

onUserClick: () => window.alert('User clicked'),
onNotificationsClick: () => window.alert('Notifications clicked'),
onUpdateClick: () => window.alert('Update clicked'),
notificationsCount: 8,
hasUpdate: true,
}

export const NoOrganization = Template.bind({})

NoOrganization.args = {
userName: 'Jane Smith',
}
Loading