Skip to content

Commit

Permalink
fix: jsdoc alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Mar 15, 2020
1 parent 9e3717b commit a5afcd2
Show file tree
Hide file tree
Showing 24 changed files with 143 additions and 143 deletions.
2 changes: 1 addition & 1 deletion docs/scripts/buildApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ async function annotateComponentDefinition(component, api) {
);

const jsdoc = `/**
* ${api.description}
* ${api.description.replace(/\n/g, '\n * ')}
*
* Demos:
* - ${demos
Expand Down
6 changes: 3 additions & 3 deletions packages/material-ui/src/ButtonBase/ButtonBase.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ export type ExtendButtonBase<M extends OverridableTypeMap> = ((

/**
* `ButtonBase` contains as few styles as possible.
It aims to be a simple building block for creating a button.
It contains a load of style reset and some focus/ripple logic.
* It aims to be a simple building block for creating a button.
* It contains a load of style reset and some focus/ripple logic.
*
* Demos:
* - {@link https://material-ui.com/components/buttons Buttons}
*
* API:
* - {@link https://material-ui.com/api/ButtonBase ButtonBase API}
*
*
*/
declare const ButtonBase: ExtendButtonBase<ButtonBaseTypeMap>;

Expand Down
10 changes: 5 additions & 5 deletions packages/material-ui/src/CircularProgress/CircularProgress.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ export type CircularProgressClassKey =

/**
* ## ARIA
If the progress bar is describing the loading progress of a particular region of a page,
you should use `aria-describedby` to point to the progress bar, and set the `aria-busy`
attribute to `true` on that region until it has finished loading.
*
* If the progress bar is describing the loading progress of a particular region of a page,
* you should use `aria-describedby` to point to the progress bar, and set the `aria-busy`
* attribute to `true` on that region until it has finished loading.
*
* Demos:
* - {@link https://material-ui.com/components/progress Progress}
*
* API:
* - {@link https://material-ui.com/api/CircularProgress CircularProgress API}
*
*
*/
declare const CircularProgress: React.ComponentType<CircularProgressProps>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ export interface ClickAwayListenerProps {

/**
* Listen for click events that occur somewhere in the document, outside of the element itself.
For instance, if you need to hide a menu when people click anywhere else on your page.
* For instance, if you need to hide a menu when people click anywhere else on your page.
*
* Demos:
* - {@link https://material-ui.com/components/click-away-listener Click Away Listener}
* - {@link https://material-ui.com/components/menus Menus}
*
* API:
* - {@link https://material-ui.com/api/ClickAwayListener ClickAwayListener API}
*
*
*/
declare const ClickAwayListener: React.ComponentType<ClickAwayListenerProps>;

Expand Down
4 changes: 2 additions & 2 deletions packages/material-ui/src/Collapse/Collapse.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export type CollapseClassKey = 'container' | 'entered' | 'hidden' | 'wrapper' |

/**
* The Collapse transition is used by the
[Vertical Stepper](/components/steppers/#vertical-stepper) StepContent component.
It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.
* [Vertical Stepper](/components/steppers/#vertical-stepper) StepContent component.
* It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.
*
* Demos:
* - {@link https://material-ui.com/components/cards Cards}
Expand Down
4 changes: 2 additions & 2 deletions packages/material-ui/src/Drawer/Drawer.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ export type DrawerClassKey =

/**
* The props of the [Modal](/api/modal/) component are available
when `variant="temporary"` is set.
* when `variant="temporary"` is set.
*
* Demos:
* - {@link https://material-ui.com/components/drawers Drawers}
*
* API:
* - {@link https://material-ui.com/api/Drawer Drawer API}
*
*
*/
declare const Drawer: React.ComponentType<DrawerProps>;

Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui/src/Fade/Fade.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export interface FadeProps extends TransitionProps {

/**
* The Fade transition is used by the [Modal](/components/modal/) component.
It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.
* It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.
*
* Demos:
* - {@link https://material-ui.com/components/transitions Transitions}
Expand Down
42 changes: 21 additions & 21 deletions packages/material-ui/src/FormControl/FormControl.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,26 @@ export interface FormControlTypeMap<P = {}, D extends React.ElementType = 'div'>

/**
* Provides context such as filled/focused/error/required for form inputs.
Relying on the context provides high flexibility and ensures that the state always stays
consistent across the children of the `FormControl`.
This context is used by the following components:
- FormLabel
- FormHelperText
- Input
- InputLabel
You can find one composition example below and more going to [the demos](/components/text-fields/#components).
```jsx
<FormControl>
<InputLabel htmlFor="my-input">Email address</InputLabel>
<Input id="my-input" aria-describedby="my-helper-text" />
<FormHelperText id="my-helper-text">We'll never share your email.</FormHelperText>
</FormControl>
```
⚠️Only one input can be used within a FormControl.
* Relying on the context provides high flexibility and ensures that the state always stays
* consistent across the children of the `FormControl`.
* This context is used by the following components:
*
* - FormLabel
* - FormHelperText
* - Input
* - InputLabel
*
* You can find one composition example below and more going to [the demos](/components/text-fields/#components).
*
* ```jsx
* <FormControl>
* <InputLabel htmlFor="my-input">Email address</InputLabel>
* <Input id="my-input" aria-describedby="my-helper-text" />
* <FormHelperText id="my-helper-text">We'll never share your email.</FormHelperText>
* </FormControl>
* ```
*
* ⚠️Only one input can be used within a FormControl.
*
* Demos:
* - {@link https://material-ui.com/components/checkboxes Checkboxes}
Expand All @@ -49,7 +49,7 @@ You can find one composition example below and more going to [the demos](/compon
*
* API:
* - {@link https://material-ui.com/api/FormControl FormControl API}
*
*
*/
declare const FormControl: OverridableComponent<FormControlTypeMap>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export type FormControlLabelClassKey =

/**
* Drop in replacement of the `Radio`, `Switch` and `Checkbox` component.
Use this component if you want to display an extra label.
* Use this component if you want to display an extra label.
*
* Demos:
* - {@link https://material-ui.com/components/checkboxes Checkboxes}
Expand All @@ -37,7 +37,7 @@ Use this component if you want to display an extra label.
*
* API:
* - {@link https://material-ui.com/api/FormControlLabel FormControlLabel API}
*
*
*/
declare const FormControlLabel: React.ComponentType<FormControlLabelProps>;

Expand Down
6 changes: 3 additions & 3 deletions packages/material-ui/src/FormGroup/FormGroup.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ export type FormGroupClassKey = 'root' | 'row';

/**
* `FormGroup` wraps controls such as `Checkbox` and `Switch`.
It provides compact row layout.
For the `Radio`, you should be using the `RadioGroup` component instead of this one.
* It provides compact row layout.
* For the `Radio`, you should be using the `RadioGroup` component instead of this one.
*
* Demos:
* - {@link https://material-ui.com/components/checkboxes Checkboxes}
* - {@link https://material-ui.com/components/switches Switches}
*
* API:
* - {@link https://material-ui.com/api/FormGroup FormGroup API}
*
*
*/
declare const FormGroup: React.ComponentType<FormGroupProps>;

Expand Down
4 changes: 2 additions & 2 deletions packages/material-ui/src/Grow/Grow.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export interface GrowProps extends Omit<TransitionProps, 'timeout'> {

/**
* The Grow transition is used by the [Tooltip](/components/tooltips/) and
[Popover](/components/popover/) components.
It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.
* [Popover](/components/popover/) components.
* It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.
*
* Demos:
* - {@link https://material-ui.com/components/popover Popover}
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui/src/IconButton/IconButton.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export type IconButtonTypeMap<

/**
* Refer to the [Icons](/components/icons/) section of the documentation
regarding the available icon options.
* regarding the available icon options.
*
* Demos:
* - {@link https://material-ui.com/components/buttons Buttons}
Expand Down
6 changes: 3 additions & 3 deletions packages/material-ui/src/InputBase/InputBase.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ export type InputBaseClassKey =

/**
* `InputBase` contains as few styles as possible.
It aims to be a simple building block for creating an input.
It contains a load of style reset and some state logic.
* It aims to be a simple building block for creating an input.
* It contains a load of style reset and some state logic.
*
* Demos:
* - {@link https://material-ui.com/components/text-fields Text Fields}
*
* API:
* - {@link https://material-ui.com/api/InputBase InputBase API}
*
*
*/
declare const InputBase: React.ComponentType<InputBaseProps>;

Expand Down
10 changes: 5 additions & 5 deletions packages/material-ui/src/LinearProgress/LinearProgress.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ export type LinearProgressClassKey =

/**
* ## ARIA
If the progress bar is describing the loading progress of a particular region of a page,
you should use `aria-describedby` to point to the progress bar, and set the `aria-busy`
attribute to `true` on that region until it has finished loading.
*
* If the progress bar is describing the loading progress of a particular region of a page,
* you should use `aria-describedby` to point to the progress bar, and set the `aria-busy`
* attribute to `true` on that region until it has finished loading.
*
* Demos:
* - {@link https://material-ui.com/components/progress Progress}
*
* API:
* - {@link https://material-ui.com/api/LinearProgress LinearProgress API}
*
*
*/
declare const LinearProgress: React.ComponentType<LinearProgressProps>;

Expand Down
6 changes: 3 additions & 3 deletions packages/material-ui/src/MenuList/MenuList.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ export type MenuListClassKey = ListClassKey;

/**
* A permanently displayed menu following https://www.w3.org/TR/wai-aria-practices/#menubutton.
It's exposed to help customization of the [`Menu`](/api/menu/) component. If you
use it separately you need to move focus into the component manually. Once
the focus is placed inside the component it is fully keyboard accessible.
* It's exposed to help customization of the [`Menu`](/api/menu/) component. If you
* use it separately you need to move focus into the component manually. Once
* the focus is placed inside the component it is fully keyboard accessible.
*
* Demos:
* - {@link https://material-ui.com/components/menus Menus}
Expand Down
22 changes: 11 additions & 11 deletions packages/material-ui/src/Modal/Modal.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,23 @@ export interface ModalProps

/**
* Modal is a lower-level construct that is leveraged by the following components:
- [Dialog](/api/dialog/)
- [Drawer](/api/drawer/)
- [Menu](/api/menu/)
- [Popover](/api/popover/)
If you are creating a modal dialog, you probably want to use the [Dialog](/api/dialog/) component
rather than directly using Modal.
This component shares many concepts with [react-overlays](https://react-bootstrap.github.io/react-overlays/#modals).
*
* - [Dialog](/api/dialog/)
* - [Drawer](/api/drawer/)
* - [Menu](/api/menu/)
* - [Popover](/api/popover/)
*
* If you are creating a modal dialog, you probably want to use the [Dialog](/api/dialog/) component
* rather than directly using Modal.
*
* This component shares many concepts with [react-overlays](https://react-bootstrap.github.io/react-overlays/#modals).
*
* Demos:
* - {@link https://material-ui.com/components/modal Modal}
*
* API:
* - {@link https://material-ui.com/api/Modal Modal API}
*
*
*/
declare const Modal: React.ComponentType<ModalProps>;

Expand Down
14 changes: 7 additions & 7 deletions packages/material-ui/src/NoSsr/NoSsr.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ export interface NoSsrProps {

/**
* NoSsr purposely removes components from the subject of Server Side Rendering (SSR).
This component can be useful in a variety of situations:
- Escape hatch for broken dependencies not supporting SSR.
- Improve the time-to-first paint on the client by only rendering above the fold.
- Reduce the rendering time on the server.
- Under too heavy server load, you can turn on service degradation.
*
* This component can be useful in a variety of situations:
* - Escape hatch for broken dependencies not supporting SSR.
* - Improve the time-to-first paint on the client by only rendering above the fold.
* - Reduce the rendering time on the server.
* - Under too heavy server load, you can turn on service degradation.
*
* Demos:
* - {@link https://material-ui.com/components/no-ssr No Ssr}
*
* API:
* - {@link https://material-ui.com/api/NoSsr NoSsr API}
*
*
*/
declare const NoSsr: React.ComponentType<NoSsrProps>;

Expand Down
4 changes: 2 additions & 2 deletions packages/material-ui/src/Portal/Portal.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ export interface PortalProps {

/**
* Portals provide a first-class way to render children into a DOM node
that exists outside the DOM hierarchy of the parent component.
* that exists outside the DOM hierarchy of the parent component.
*
* Demos:
* - {@link https://material-ui.com/components/portal Portal}
*
* API:
* - {@link https://material-ui.com/api/Portal Portal API}
*
*
*/
export default function Portal(props: PortalProps): JSX.Element;
Loading

0 comments on commit a5afcd2

Please sign in to comment.