Skip to content
This repository has been archived by the owner on Feb 27, 2020. It is now read-only.

Commit

Permalink
Some sidebar tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
kzantow committed Jul 18, 2018
1 parent f65e90d commit d2c2ec7
Show file tree
Hide file tree
Showing 9 changed files with 3,112 additions and 1,495 deletions.
31 changes: 18 additions & 13 deletions components/Sidebar/README.md
@@ -1,17 +1,22 @@
Buttons are one of the most basic types of controls for interacting with an application.
A sidebar goes by many different names (Material UI refers to "Drawer")

#### Button Types
#### Example

```jsx
<Button>Default</Button>
<Button primary>Primary</Button>
<Button destructive>Destructive</Button>
```

#### Button Sizes

```jsx
<Button small>Small</Button>
<Button>Normal</Button>
<Button large>Large</Button>
<div style={{position:'relative',height:'40px'}}>
<Sidebar
main={
<>
<Sidebar.AppLogo
icon={'U'}
brand={'Jenkins'}
name={'Design Language'}
/>
<Sidebar.Item icon={'B'}>Branches</Sidebar.Item>
<Sidebar.Item icon={'C'}>Commits</Sidebar.Item>
</>
}
footer={<Sidebar.Item icon={'F'}>Footer</Sidebar.Item>}
/>
</div>
```
8 changes: 6 additions & 2 deletions components/Sidebar/Sidebar.scss
Expand Up @@ -108,10 +108,14 @@

.NavHoverIcon {
background: transparent;
border-radius: $border-radius;
border-radius: 4px;
cursor: pointer;
padding: $unit;
width: 32px;
margin-right: 8px;
bottom: 0;
align-items: center;
display: flex;

&:hover {
background: $nav-hover-color;
}
Expand Down
2 changes: 1 addition & 1 deletion components/Sidebar/Sidebar.stories.tsx
Expand Up @@ -19,7 +19,7 @@ storiesOf('Sidebar', module).add('example', () => {
<Sidebar.Item icon={<GitCommit />}>Commits</Sidebar.Item>
</>
}
footer={<Sidebar.Item icon={<GitCommit />}>Commits</Sidebar.Item>}
footer={<Sidebar.Item icon={<UserIcon size={32} />}>Footer</Sidebar.Item>}
/>
);
});
4 changes: 2 additions & 2 deletions components/Sidebar/SidebarItem.tsx
Expand Up @@ -8,9 +8,9 @@ export interface SidebarItemProps {

export function SidebarItem({ children, icon, onClick }: SidebarItemProps) {
return (
<div className="NavLink mt3" onClick={onClick}>
<div className="NavLink" onClick={onClick}>
<div className="Nav-Bound">
{icon}
{icon && <div className="NavHoverIcon">{icon}</div>}
<div className="NavLink-Title">{children}</div>
</div>
</div>
Expand Down
4 changes: 4 additions & 0 deletions docs/README.md
Expand Up @@ -21,3 +21,7 @@ To publish updated styleguidist docs, run:
```
npm run styleguide-build
```

## Randon Notes

Is this any good? http://typedoc.org/
1,639 changes: 1,336 additions & 303 deletions docs/docs/build/main.js

Large diffs are not rendered by default.

0 comments on commit d2c2ec7

Please sign in to comment.