Skip to content

Commit

Permalink
feat: nav structure
Browse files Browse the repository at this point in the history
  • Loading branch information
karl-kallavus committed Jan 25, 2021
1 parent 91b2f4b commit 9c5fd37
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 44 deletions.
8 changes: 1 addition & 7 deletions docs/config.json
Expand Up @@ -25,16 +25,10 @@
"Assets",
"Design System",
"Toolkit",
"Calendar",
"Components",
"Global",
"Pagination",
"Private",
"Sidebar",
"Table",
"Charts",
"Utils",
"Popover",
"Accordion"
"Utils"
]
}
4 changes: 2 additions & 2 deletions packages/accordion/src/README.mdx
@@ -1,7 +1,7 @@
---
name: Accordion
menu: Accordion
route: /accordion/accordion
menu: Toolkit
route: /toolkit/accordion
---

# Accordion
Expand Down
16 changes: 8 additions & 8 deletions packages/calendar/src/README.mdx
@@ -1,7 +1,7 @@
---
name: Calendar
menu: Calendar
route: /Calendar/calendar
menu: Toolkit
route: /toolkit/calendar
---

Week and Month calendar components have the same api
Expand All @@ -20,7 +20,7 @@ Week and Month calendar components have the same api

```jsx react-live
() => {
const isToday = someDate => {
const isToday = (someDate) => {
const today = new Date();
return (
someDate.getDate() == today.getDate() &&
Expand All @@ -29,9 +29,9 @@ Week and Month calendar components have the same api
);
};

const renderDayContent = date => (isToday(date) ? 'today' : null);
const renderDayContent = (date) => (isToday(date) ? 'today' : null);

const renderNearDayNumber = date => (isToday(date) ? 't' : null);
const renderNearDayNumber = (date) => (isToday(date) ? 't' : null);

return (
<Month
Expand All @@ -47,7 +47,7 @@ Week and Month calendar components have the same api

```jsx react-live
() => {
const isToday = someDate => {
const isToday = (someDate) => {
const today = new Date();
return (
someDate.getDate() == today.getDate() &&
Expand All @@ -56,9 +56,9 @@ Week and Month calendar components have the same api
);
};

const renderDayContent = date => (isToday(date) ? 'today' : null);
const renderDayContent = (date) => (isToday(date) ? 'today' : null);

const renderNearDayNumber = date => (isToday(date) ? 't' : null);
const renderNearDayNumber = (date) => (isToday(date) ? 't' : null);

return (
<div style={{ height: '800px' }}>
Expand Down
28 changes: 14 additions & 14 deletions packages/pagination/src/README.mdx
@@ -1,7 +1,7 @@
---
name: Pagination
menu: Components
route: /Pagination/pagination
menu: Toolkit
route: /toolkit/pagination
---

# Pagination
Expand Down Expand Up @@ -35,7 +35,7 @@ Pagination component based on [react-paginate](https://github.com/AdeleD/react-p
pageNumber={10}
previousButtonLabel="Previous"
nextButtonLabel="Next"
onChange={value => console.log('pageNumber: ', value)}
onChange={(value) => console.log('pageNumber: ', value)}
/>
```

Expand All @@ -49,7 +49,7 @@ Pagination component based on [react-paginate](https://github.com/AdeleD/react-p
pageNumber={10}
previousButtonLabel="Previous"
nextButtonLabel="Next"
onChange={value => console.log('pageNumber: ', value)}
onChange={(value) => console.log('pageNumber: ', value)}
pageSizeSection={
<Text size={12} as="strong">
Showing 110{' '}
Expand All @@ -71,12 +71,12 @@ Pagination component based on [react-paginate](https://github.com/AdeleD/react-p
pageNumber={10}
previousButtonLabel="Previous"
nextButtonLabel="Next"
onChange={value => console.log('pageNumber: ', value)}
onChange={(value) => console.log('pageNumber: ', value)}
goToPageSection={
<GoToPage
minPage={1}
maxPage={20}
onChange={value => console.log('GoToPage: ', value)}
onChange={(value) => console.log('GoToPage: ', value)}
>
Go to page
</GoToPage>
Expand All @@ -94,11 +94,11 @@ Pagination component based on [react-paginate](https://github.com/AdeleD/react-p
pageNumber={10}
previousButtonLabel="Previous"
nextButtonLabel="Next"
onChange={value => console.log('pageNumber: ', value)}
onChange={(value) => console.log('pageNumber: ', value)}
changePageSizeSection={
<ChangePageSize
pageSize={20}
onChange={value => console.log('Change page size: ', value)}
onChange={(value) => console.log('Change page size: ', value)}
options={[
{ label: '10', value: 10 },
{ label: '20', value: 20 },
Expand All @@ -122,7 +122,7 @@ Pagination component based on [react-paginate](https://github.com/AdeleD/react-p
pageNumber={10}
previousButtonLabel="Previous"
nextButtonLabel="Next"
onChange={value => console.log('pageNumber: ', value)}
onChange={(value) => console.log('pageNumber: ', value)}
pageSizeSection={
<Text size={12} as="strong">
Showing 110{' '}
Expand All @@ -135,15 +135,15 @@ Pagination component based on [react-paginate](https://github.com/AdeleD/react-p
<GoToPage
minPage={1}
maxPage={20}
onChange={value => console.log('GoToPage: ', value)}
onChange={(value) => console.log('GoToPage: ', value)}
>
Go to page
</GoToPage>
}
changePageSizeSection={
<ChangePageSize
pageSize={20}
onChange={value => console.log('Change page size: ', value)}
onChange={(value) => console.log('Change page size: ', value)}
options={[
{ label: '10', value: 10 },
{ label: '20', value: 20 },
Expand All @@ -167,7 +167,7 @@ Pagination component based on [react-paginate](https://github.com/AdeleD/react-p
pageNumber={10}
previousButtonLabel={<IconChevronLeft />}
nextButtonLabel={<IconChevronRight />}
onChange={value => console.log('pageNumber: ', value)}
onChange={(value) => console.log('pageNumber: ', value)}
/>
```

Expand All @@ -181,7 +181,7 @@ Pagination component based on [react-paginate](https://github.com/AdeleD/react-p
pageNumber={1}
previousButtonLabel="Previous"
nextButtonLabel="Next"
onChange={value => console.log('pageNumber: ', value)}
onChange={(value) => console.log('pageNumber: ', value)}
/>
```

Expand All @@ -195,6 +195,6 @@ Pagination component based on [react-paginate](https://github.com/AdeleD/react-p
pageNumber={20}
previousButtonLabel="Previous"
nextButtonLabel="Next"
onChange={value => console.log('pageNumber: ', value)}
onChange={(value) => console.log('pageNumber: ', value)}
/>
```
6 changes: 3 additions & 3 deletions packages/popover/src/README.mdx
@@ -1,7 +1,7 @@
---
name: Popover
menu: Popover
route: /popover/popover
menu: Toolkit
route: /toolkit/popover
---

# Popover
Expand Down Expand Up @@ -33,7 +33,7 @@ type Placement = 'top'
<Inline>
<Popover
isOpen={false}
onVisibilityChange={status => console.log('status: ', status)}
onVisibilityChange={(status) => console.log('status: ', status)}
content={
<div>
<Heading size={20} style={{ marginBottom: 20 }}>
Expand Down
4 changes: 2 additions & 2 deletions packages/sidebar/src/README.mdx
@@ -1,7 +1,7 @@
---
name: Sidebar
menu: Sidebar
route: /Sidebar/sidebar
menu: Toolkit
route: /toolkit/sidebar
---

import { Sidebar } from '@heathmont/moon-components';
Expand Down
16 changes: 8 additions & 8 deletions packages/table/src/README.mdx
@@ -1,7 +1,7 @@
---
name: Table
menu: Table
route: /table/table
menu: Toolkit
route: /toolkit/table
---

# Table
Expand Down Expand Up @@ -67,7 +67,7 @@ Table supports `width`, `height`, `maxWidth` and `maxHeight` properties.
},
];

const makeData = length => {
const makeData = (length) => {
return Array.from('_'.repeat(length)).map(() => {
return {
firstName: 'Test',
Expand Down Expand Up @@ -188,7 +188,7 @@ Table supports `width`, `height`, `maxWidth` and `maxHeight` properties.
},
];

const makeData = length => {
const makeData = (length) => {
return Array.from('_'.repeat(length)).map(() => {
return {
firstName: 'Test',
Expand Down Expand Up @@ -271,7 +271,7 @@ Table supports `width`, `height`, `maxWidth` and `maxHeight` properties.
},
];

const makeData = length => {
const makeData = (length) => {
return Array.from('_'.repeat(length)).map((_, index) => {
return {
date: <strong>January {(index + 1) % 30}, 2020</strong>,
Expand Down Expand Up @@ -365,7 +365,7 @@ Table supports `width`, `height`, `maxWidth` and `maxHeight` properties.
},
];

const makeData = length => {
const makeData = (length) => {
return Array.from('_'.repeat(length)).map(() => {
return {
firstName: 'Test',
Expand Down Expand Up @@ -442,7 +442,7 @@ Table supports `width`, `height`, `maxWidth` and `maxHeight` properties.
},
];

const makeData = length => {
const makeData = (length) => {
return Array.from('_'.repeat(length)).map(() => {
return {
firstName: 'Test',
Expand Down Expand Up @@ -475,7 +475,7 @@ Table supports `width`, `height`, `maxWidth` and `maxHeight` properties.
defaultColumn={defaultColumn}
width={800}
height={400}
onRowClick={row => console.log(row)}
onRowClick={(row) => console.log(row)}
/>
);
};
Expand Down

0 comments on commit 9c5fd37

Please sign in to comment.