From 240e683776c42285e9b76fa8c0d37336a79cc8e4 Mon Sep 17 00:00:00 2001 From: danicashen Date: Mon, 20 May 2019 11:45:59 +0100 Subject: [PATCH] fix(doc): fix some apostrophe in typescript doc --- docs/src/pages/guides/typescript/typescript.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/src/pages/guides/typescript/typescript.md b/docs/src/pages/guides/typescript/typescript.md index a2d40a6fc246d8..7de37d62711b78 100644 --- a/docs/src/pages/guides/typescript/typescript.md +++ b/docs/src/pages/guides/typescript/typescript.md @@ -98,7 +98,7 @@ const styles = createStyles({ }); ``` -However to allow these styles to pass TypeScript the definitions have to be ambiguous concerning names for CSS classes and actual CSS property names. Due to this class names that are equal to CSS properties should be avoided. +However to allow these styles to pass TypeScript, the definitions have to be ambiguous concerning names for CSS classes and actual CSS property names. Due to this class names that are equal to CSS properties should be avoided. ```ts // error because TypeScript thinks `@media (min-width: 960px)` is a class name @@ -151,7 +151,7 @@ interface Props { } ``` -However this isn't very [DRY](https://en.wikipedia.org/wiki/Don%27t_repeat_yourself) because it requires you to maintain the class names (`'root'`, `'paper'`, `'button'`, ...) in two different places. We provide a type operator `WithStyles` to help with this, so that you can just write +However this isn't very [DRY](https://en.wikipedia.org/wiki/Don%27t_repeat_yourself) because it requires you to maintain the class names (`'root'`, `'paper'`, `'button'`, ...) in two different places. We provide a type operator `WithStyles` to help with this, so that you can just write: ```ts import { WithStyles, createStyles } from '@material-ui/core'; @@ -251,8 +251,8 @@ const theme = createMyTheme({ appDrawer: { breakpoint: 'md' }}); ## Usage of `component` property Material-UI allows you to replace a component's root node via a `component` property. For example, a `Button`'s root node can be replaced with a React Router `Link`, and any additional props that are passed to `Button`, such as `to`, will be spread to the `Link` component. For a code -example concerning `Button` and `react-router-dom` checkout [this Button demo](/components/buttons/#third-party-routing-library) +example concerning `Button` and `react-router-dom` checkout [this Button demo](/components/buttons/#third-party-routing-library). Not every component fully supports any component type you pass in. If you encounter a component that rejects its `component` props in TypeScript please open an issue. -There is an ongoing effort to fix this by making component props generic. \ No newline at end of file +There is an ongoing effort to fix this by making component props generic.