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

add doc structure and example #44

Merged
merged 42 commits into from
Jul 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
b2e83a6
added doc structure and example
dtassone Jul 1, 2020
fdec9a5
replace xgrid with grid as not published yet
dtassone Jul 1, 2020
d31d703
WIP working on columns mdx
dtassone Jul 2, 2020
138e920
add columns doc and demos
dtassone Jul 2, 2020
cb5305c
fix column demo doc
dtassone Jul 2, 2020
30e36eb
fix ts code markdown
dtassone Jul 3, 2020
e5f7e0f
add autoheight, rename components Grid to XGrid, add classname prop, …
dtassone Jul 3, 2020
3b81c04
fix grid-root classname, fix import React
dtassone Jul 3, 2020
facaad2
v0.1.43
dtassone Jul 3, 2020
8988297
Update packages/storybook/src/docs/columns.stories.mdx
dtassone Jul 6, 2020
0481c63
Update packages/storybook/src/docs/columns.stories.mdx
dtassone Jul 6, 2020
e2e4f3c
Rewording doc
dtassone Jul 6, 2020
5454c09
Update packages/storybook/src/docs/columns.stories.mdx
dtassone Jul 6, 2020
3c451c4
Update packages/storybook/src/docs/quick-start.stories.mdx
dtassone Jul 6, 2020
6679fc0
Update packages/storybook/src/docs/quick-start.stories.mdx
dtassone Jul 6, 2020
229bcee
Update packages/storybook/src/docs/sorting.stories.mdx
dtassone Jul 6, 2020
92c4fb7
Update packages/storybook/src/docs/columns.stories.mdx
dtassone Jul 6, 2020
f7fe535
Update packages/storybook/src/docs/quick-start.stories.mdx
dtassone Jul 6, 2020
15b3953
Update packages/storybook/src/docs/quick-start.stories.mdx
dtassone Jul 6, 2020
18820a2
Rewording: Apply suggestions from code review
dtassone Jul 6, 2020
94cc8a5
Added 3rd level titles
dtassone Jul 6, 2020
9bd1d71
Merge branch 'mdxDoc' of github.com:mui-org/material-ui-x into mdxDoc
dtassone Jul 6, 2020
4604f06
revert react import change
dtassone Jul 6, 2020
d49f1f3
testing grid with codesandbox
dtassone Jul 6, 2020
e27e804
v0.1.44
dtassone Jul 6, 2020
e53d469
revert react import change
dtassone Jul 6, 2020
8c63b1c
remove terser
dtassone Jul 6, 2020
5fa86c9
v0.1.45
dtassone Jul 6, 2020
e6ca144
refactor rowcells to avoid nested react
dtassone Jul 6, 2020
80af7fb
v0.1.46
dtassone Jul 6, 2020
efe6219
better refactor of rowcells to fix codesandbox
dtassone Jul 6, 2020
e7e5338
upgrade dependencies
dtassone Jul 6, 2020
57078be
v0.1.47
dtassone Jul 6, 2020
83dceac
add tslib devdep
dtassone Jul 6, 2020
0f2063d
v0.1.48
dtassone Jul 6, 2020
1182807
upgrade dependencies
dtassone Jul 6, 2020
402d521
v0.1.49
dtassone Jul 6, 2020
e7cb9e3
move tslib in dependencies :(
dtassone Jul 6, 2020
1d82dbd
v0.1.50
dtassone Jul 6, 2020
0d296dd
split and simplify demos
dtassone Jul 7, 2020
917b57e
Merge branch 'master' into mdxDoc
dtassone Jul 7, 2020
b372f5e
yarn and prettier
dtassone Jul 7, 2020
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
64 changes: 64 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,70 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.1.50](https://github.com/mui-org/material-ui-x/compare/v0.1.49...v0.1.50) (2020-07-06)

**Note:** Version bump only for package material-ui-x





## [0.1.49](https://github.com/mui-org/material-ui-x/compare/v0.1.48...v0.1.49) (2020-07-06)

**Note:** Version bump only for package material-ui-x





## [0.1.48](https://github.com/mui-org/material-ui-x/compare/v0.1.47...v0.1.48) (2020-07-06)

**Note:** Version bump only for package material-ui-x





## [0.1.47](https://github.com/mui-org/material-ui-x/compare/v0.1.46...v0.1.47) (2020-07-06)

**Note:** Version bump only for package material-ui-x





## [0.1.46](https://github.com/mui-org/material-ui-x/compare/v0.1.45...v0.1.46) (2020-07-06)

**Note:** Version bump only for package material-ui-x





## [0.1.45](https://github.com/mui-org/material-ui-x/compare/v0.1.44...v0.1.45) (2020-07-06)

**Note:** Version bump only for package material-ui-x





## [0.1.44](https://github.com/mui-org/material-ui-x/compare/v0.1.43...v0.1.44) (2020-07-06)

**Note:** Version bump only for package material-ui-x





## [0.1.43](https://github.com/mui-org/material-ui-x/compare/v0.1.42...v0.1.43) (2020-07-03)

**Note:** Version bump only for package material-ui-x





## [0.1.42](https://github.com/mui-org/material-ui-x/compare/v0.1.41...v0.1.42) (2020-06-29)

**Note:** Version bump only for package material-ui-x
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
}
},
"packages": ["!packages/grid", "packages/*", "packages/grid/*"],
"version": "0.1.42",
"version": "0.1.50",
"npmClient": "yarn",
"useWorkspaces": true
}
64 changes: 64 additions & 0 deletions packages/demo-app/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,70 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.1.50](https://github.com/mui-org/material-ui-x/compare/v0.1.49...v0.1.50) (2020-07-06)

**Note:** Version bump only for package demo-app





## [0.1.49](https://github.com/mui-org/material-ui-x/compare/v0.1.48...v0.1.49) (2020-07-06)

**Note:** Version bump only for package demo-app





## [0.1.48](https://github.com/mui-org/material-ui-x/compare/v0.1.47...v0.1.48) (2020-07-06)

**Note:** Version bump only for package demo-app





## [0.1.47](https://github.com/mui-org/material-ui-x/compare/v0.1.46...v0.1.47) (2020-07-06)

**Note:** Version bump only for package demo-app





## [0.1.46](https://github.com/mui-org/material-ui-x/compare/v0.1.45...v0.1.46) (2020-07-06)

**Note:** Version bump only for package demo-app





## [0.1.45](https://github.com/mui-org/material-ui-x/compare/v0.1.44...v0.1.45) (2020-07-06)

**Note:** Version bump only for package demo-app





## [0.1.44](https://github.com/mui-org/material-ui-x/compare/v0.1.43...v0.1.44) (2020-07-06)

**Note:** Version bump only for package demo-app





## [0.1.43](https://github.com/mui-org/material-ui-x/compare/v0.1.42...v0.1.43) (2020-07-03)

**Note:** Version bump only for package demo-app





## [0.1.41](https://github.com/mui-org/material-ui-x/compare/v0.1.40...v0.1.41) (2020-06-29)

**Note:** Version bump only for package demo-app
Expand Down
10 changes: 5 additions & 5 deletions packages/demo-app/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "demo-app",
"version": "0.1.41",
"version": "0.1.50",
"private": true,
"dependencies": {
"@material-ui-x/panel": "^0.1.40",
"@material-ui-x/splitter": "^0.1.40",
"@material-ui-x/panel": "^0.1.45",
"@material-ui-x/splitter": "^0.1.45",
"@material-ui/core": "^4.9.12",
"@material-ui/icons": "^4.9.1",
"@material-ui/lab": "^4.0.0-alpha.54",
"@material-ui/x-grid": "^0.1.40",
"@material-ui/x-grid-data-generator": "^0.1.40",
"@material-ui/x-grid": "^0.1.50",
"@material-ui/x-grid-data-generator": "^0.1.49",
"@trendmicro/react-interpolate": "^0.5.5",
"react": "^16.13.1",
"react-dom": "^16.13.1",
Expand Down
3 changes: 2 additions & 1 deletion packages/demo-app/src/app/app-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import IconButton from '@material-ui/core/IconButton';
import MenuIcon from '@material-ui/icons/Menu';
import Typography from '@material-ui/core/Typography';
import AppBar from '@material-ui/core/AppBar';
import React, { useEffect, useState } from 'react';
import * as React from 'react';
import { useEffect, useState } from 'react';
import makeStyles from '@material-ui/core/styles/makeStyles';
import { createStyles, Link, Theme } from '@material-ui/core';
import Brightness7Icon from '@material-ui/icons/Brightness7';
Expand Down
2 changes: 1 addition & 1 deletion packages/demo-app/src/app/app-breadcrumbs.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Link from '@material-ui/core/Link';

import Breadcrumbs from '@material-ui/core/Breadcrumbs';
import React from 'react';
import * as React from 'react';

import styled from 'styled-components';

Expand Down
2 changes: 1 addition & 1 deletion packages/demo-app/src/app/app-drawer.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import SwipeableDrawer from '@material-ui/core/SwipeableDrawer';
import List from '@material-ui/core/List';
Expand Down
2 changes: 1 addition & 1 deletion packages/demo-app/src/app/app-footer.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';

import Interpolate from '@trendmicro/react-interpolate';

Expand Down
2 changes: 1 addition & 1 deletion packages/demo-app/src/app/app-intro.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { MuiLogo } from './demos/grid/components/logo';
import Typography from '@material-ui/core/Typography';

import React from 'react';
import * as React from 'react';
import { Button, Container } from '@material-ui/core';
import styled from 'styled-components';
import KeyboardArrowRightIcon from '@material-ui/icons/KeyboardArrowRight';
Expand Down
3 changes: 2 additions & 1 deletion packages/demo-app/src/app/app.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { useCallback, useReducer } from 'react';
import * as React from 'react';
import { useCallback, useReducer } from 'react';
import { DemoAppBar } from './app-bar';

import './app.less';
Expand Down
2 changes: 1 addition & 1 deletion packages/demo-app/src/app/demos/grid/components/logo.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import styled from 'styled-components';

export const LogoContainer = styled.div`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { ChangeEvent, useCallback, useEffect, useState } from 'react';
import * as React from 'react';
import { ChangeEvent, useCallback, useEffect, useState } from 'react';
import { StyledPanels } from './styled-panel';

import { FormControl, FormGroup, Button, FormLabel, MenuItem, Select } from '@material-ui/core';
Expand Down
7 changes: 4 additions & 3 deletions packages/demo-app/src/app/demos/grid/real-data-grid.demo.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { useEffect, useState } from 'react';
import * as React from 'react';
import { useEffect, useState } from 'react';
import { AppBreadcrumbs } from '../../app-breadcrumbs';
import { Grid, LicenseInfo, RowModel, Columns, GridOptions } from '@material-ui/x-grid';
import { XGrid, LicenseInfo, RowModel, Columns, GridOptions } from '@material-ui/x-grid';
import pkg from '@material-ui/x-grid/package.json';
import { MainContainer } from './components/main-container';
import { SettingsPanel } from './components/settings-panel';
Expand Down Expand Up @@ -122,7 +123,7 @@ export const RealDataGridDemo: React.FC<{}> = props => {
<MainContainer>
<div style={{ display: 'flex', boxSizing: 'border-box' }} className={'fill-space'}>
<div className={'grow'}>
<Grid
<XGrid
rows={rows as any}
columns={cols as any}
loading={loading}
Expand Down
2 changes: 1 addition & 1 deletion packages/demo-app/src/app/demos/splitter/dummyContent.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';

export const DummyContent = () => (
<div>
Expand Down
3 changes: 2 additions & 1 deletion packages/demo-app/src/app/demos/splitter/splitter-demo.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { Button } from '@material-ui/core';
import TextField from '@material-ui/core/TextField';

import React, { useState } from 'react';
import * as React from 'react';
import { useState } from 'react';
import { DummyContent } from './dummyContent';
import { Splitter } from '@material-ui-x/splitter';
import { AppBreadcrumbs } from '../../app-breadcrumbs';
Expand Down
2 changes: 1 addition & 1 deletion packages/demo-app/src/app/demos/theme/themeProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//old blue: #3f51b5
import { createMuiTheme, ThemeProvider as MuiThemeProvider } from '@material-ui/core/styles';
import { PaletteOptions } from '@material-ui/core/styles/createPalette';
import React from 'react';
import * as React from 'react';
import { ThemeProvider as SCThemeProvider } from 'styled-components';
import { ThemeColors } from './utils';
import { lightTheme, lightThemeId } from './light';
Expand Down
2 changes: 1 addition & 1 deletion packages/demo-app/src/app/demos/utils/devToggle.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';

const isDev = process.env.NODE_ENV !== 'production';

Expand Down
2 changes: 1 addition & 1 deletion packages/demo-app/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import ReactDOM from 'react-dom';
import App from './app/app';

Expand Down
56 changes: 56 additions & 0 deletions packages/grid/data-grid/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,62 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.1.49](https://github.com/mui-org/material-ui-x/compare/v0.1.48...v0.1.49) (2020-07-06)

**Note:** Version bump only for package @material-ui/data-grid





## [0.1.48](https://github.com/mui-org/material-ui-x/compare/v0.1.47...v0.1.48) (2020-07-06)

**Note:** Version bump only for package @material-ui/data-grid





## [0.1.47](https://github.com/mui-org/material-ui-x/compare/v0.1.46...v0.1.47) (2020-07-06)

**Note:** Version bump only for package @material-ui/data-grid





## [0.1.46](https://github.com/mui-org/material-ui-x/compare/v0.1.45...v0.1.46) (2020-07-06)

**Note:** Version bump only for package @material-ui/data-grid





## [0.1.45](https://github.com/mui-org/material-ui-x/compare/v0.1.44...v0.1.45) (2020-07-06)

**Note:** Version bump only for package @material-ui/data-grid





## [0.1.44](https://github.com/mui-org/material-ui-x/compare/v0.1.43...v0.1.44) (2020-07-06)

**Note:** Version bump only for package @material-ui/data-grid





## [0.1.43](https://github.com/mui-org/material-ui-x/compare/v0.1.42...v0.1.43) (2020-07-03)

**Note:** Version bump only for package @material-ui/data-grid





## [0.1.42](https://github.com/mui-org/material-ui-x/compare/v0.1.41...v0.1.42) (2020-06-29)

**Note:** Version bump only for package @material-ui/data-grid
Expand Down
6 changes: 3 additions & 3 deletions packages/grid/data-grid/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ Then you need to create some columns which are simple objects containing at leas
You can import `ColDef` to see all column properties.
A simple set of column can be.

```typescript jsx
```tsx
const columns = [{ field: "id"}, {field: "name", headerName: 'Client Name'}...];
```

Rows are string key value pair objects.

```typescript jsx
```tsx
const rows = [{id: 1, name:'Jon Snow'}, {id: 2, name: 'Tyrion Lannister'}...]
```

A complete example below.

```typescript jsx
```tsx
import * as React from 'react';
import { ColDef, Grid } from '@material-ui-x/grid';

Expand Down
Loading