Skip to content

Commit

Permalink
Breadcrumbs docs fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
netmenya committed May 6, 2018
1 parent f0534e4 commit 5f2464d
Show file tree
Hide file tree
Showing 9 changed files with 66 additions and 57 deletions.
14 changes: 11 additions & 3 deletions demo/routes/breadcrumbs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { RouteInfo, RouteProps } from '../../components/Route/RouteStructure';

//eslint-disable-next-line
import BreadcrumbsCode from '!raw-loader!../../../packages/reactackle-breadcrumbs/src/Breadcrumbs';
//eslint-disable-next-line
import BreadcrumbsItemCode from '!raw-loader!../../../packages/reactackle-breadcrumbs/src/BreadcrumbsItem/BreadcrumbsItem';

const propTypes = RouteInfo.propTypes;
const defaultProps = {
Expand All @@ -11,11 +13,17 @@ const defaultProps = {
routeTitle: 'Breadcrumbs',
};

const itemProps = (
const itemProps = [
<RouteProps
componentCode={BreadcrumbsCode}
/>
);
key='component-code'
/>,
<RouteProps
componentCode={BreadcrumbsItemCode}
title="Item Props"
key='component-item-code'
/>,
];

export const BreadcrumbsIndexRoute = props => (
<div className="route-info">
Expand Down
2 changes: 1 addition & 1 deletion demo/routes/customizing/customizing.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
import {
ArticleModule,
ArticleHeader,
} from '../../components/Article/Article';
} from '../../components/Article';

import { CodeBox } from '../../components/CodeBox/CodeBox';
import Theming from './snippets/theming.snippet';
Expand Down
2 changes: 1 addition & 1 deletion demo/routes/tabs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React from 'react';
import {
ArticleModule,
ArticleHeader,
} from '../../components/Article/Article';
} from '../../components/Article';
import {
RouteInfo,
RouteProps,
Expand Down
2 changes: 1 addition & 1 deletion demo/routes/theme/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
import {
ArticleModule,
ArticleHeader,
} from '../../components/Article/Article';
} from '../../components/Article';

import { CodeBox } from '../../components/CodeBox/CodeBox';
import ThemeStructure from './snippets/theme-structure.snippet';
Expand Down
2 changes: 1 addition & 1 deletion demo/routes/usage/usage.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
import {
ArticleModule,
ArticleHeader,
} from '../../components/Article/Article';
} from '../../components/Article';

import { CodeBox } from '../../components/CodeBox/CodeBox';

Expand Down
62 changes: 31 additions & 31 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions packages/reactackle-breadcrumbs/src/Breadcrumbs.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,38 +17,38 @@ import {
registerDefaultComponentTheme('breadcrumbs', componentTheme);

const propTypes = {
/*
/**
* Array of breadcrumbs items
*/
items: PropTypes.arrayOf(BreadcrumbsItem).isRequired,
/*
/**
* If true, breadcrumbs will become scrollable to fit wrapper width
*/
overflow: PropTypes.bool,
/*
/**
* Component to be used as a link in BreadcrumbItem
*/
linkComponent: PropTypes.func,
/*
/**
* Define component's color scheme
*/
colorScheme: PropTypes.oneOf(['light', 'dark']),
/*
/**
* Vertical align of items
*/
alignItems: PropTypes.oneOf(['top', 'center', 'bottom']),
/*
/**
* Type of separator between items
*/
separatorType: PropTypes.oneOf(['text', 'icon']),
/*
/**
* Define separator
*/
separatorIcon: PropTypes.oneOfType([
PropTypes.string,
PropTypes.element,
]),
/*
/**
* Function to be used on item's click
*/
onItemClick: PropTypes.func,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,46 +27,46 @@ const MenuItemType =
});

const propTypes = {
/*
/**
* Define component's color scheme
*/
colorScheme: PropTypes.oneOf(['light', 'dark']),
/*
/**
* Item index
*/
index: PropTypes.number,
/*
/**
* Adds home icon
*/
home: PropTypes.bool,
/*
/**
* Item's title
*/
title: PropTypes.string,
/*
/**
* Item's subtitle
*/
subtitle: PropTypes.string,
/*
/**
* Define separator
*/
separatorIcon: PropTypes.oneOfType([
PropTypes.string,
PropTypes.element,
]),
/*
/**
* Item's href
*/
itemHref: PropTypes.string,
/*
/**
* Active item isn't clickable and have special appearance
*/
isActive: PropTypes.bool,
/*
/**
* Component to be used as a link
*/
linkComponent: PropTypes.func,
/*
/**
* Content's vertical align
*/
alignItems: PropTypes.oneOf(['top', 'center', 'bottom']),
Expand All @@ -76,7 +76,7 @@ const propTypes = {
type: PropTypes.func,
data: PropTypes.arrayOf(MenuItemType),
})),
/*
/**
* ariaCurrentValue value
*/
ariaCurrentValue: PropTypes.string,
Expand Down
1 change: 1 addition & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ const mainConfig = {

devServer: {
port: 8090,
host: '0.0.0.0',
contentBase: 'dist/',
publicPath: '/',
},
Expand Down

0 comments on commit 5f2464d

Please sign in to comment.