Skip to content

Commit

Permalink
[docs] Add api docs
Browse files Browse the repository at this point in the history
  • Loading branch information
yamankatby committed Nov 6, 2021
1 parent ead8cf3 commit b72bcba
Show file tree
Hide file tree
Showing 21 changed files with 667 additions and 10 deletions.
20 changes: 20 additions & 0 deletions docs/docs/api/activity-indicator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# ActivityIndicator

API documentation for the React Native ActivityIndicator component. Learn about the available props.

## Import

```js
import { ActivityIndicator } from "@react-native-material/core";
// or
import ActivityIndicator from "@react-native-material/core/ActivityIndicator";
```

## Props

```ts
interface ActivityIndicatorProps extends NativeActivityIndicatorProps {
color?: PaletteColor;
}

```
60 changes: 60 additions & 0 deletions docs/docs/api/appbar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Appbar

API documentation for the React Native Appbar component. Learn about the available props.

## Import

```js
import { Appbar } from "@react-native-material/core";
// or
import Appbar from "@react-native-material/core/Appbar";
```

## Props

```ts
interface AppbarProps extends SurfaceProps {
title?: string | React.ReactElement;

subtitle?: string | React.ReactElement;

variant?: "top" | "bottom";

color?: PaletteColor;

tintColor?: PaletteColor;

enableColorOnDark?: boolean;

transparent?: boolean;

centerTitle?: boolean;

leading?:
| React.ReactElement
| React.ReactElement[]
| ((props: { color: string; size: number }) => React.ReactElement | React.ReactElement[] | null)
| null;

trailing?:
| React.ReactElement
| React.ReactElement[]
| ((props: { color: string; size: number }) => React.ReactElement | React.ReactElement[] | null)
| null;

contentContainerStyle?: StyleProp<ViewStyle>;

titleContainerStyle?: StyleProp<ViewStyle>;

titleStyle?: StyleProp<TextStyle>;

subtitleStyle?: StyleProp<TextStyle>;

toolbarContainerStyle?: StyleProp<ViewStyle>;

leadingContainerStyle?: StyleProp<ViewStyle>;

trailingContainerStyle?: StyleProp<ViewStyle>;
}

```
46 changes: 46 additions & 0 deletions docs/docs/api/avatar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Avatar

API documentation for the React Native Avatar component. Learn about the available props.

## Import

```js
import { Avatar } from "@react-native-material/core";
// or
import Avatar from "@react-native-material/core/Avatar";
```

## Props

```ts
interface AvatarProps {
label?: string | React.ReactElement | ((props: { color: string }) => React.ReactElement | null) | null;

image?: ImageSourcePropType | React.ReactElement | ((props: { size: number }) => React.ReactElement | null) | null;

icon?: React.ReactElement | ((props: { color: string; size: number }) => React.ReactElement | null) | null;

size?: number;

color?: PaletteColor;

tintColor?: PaletteColor;

initials?: boolean;

uppercase?: boolean;

autoColor?: boolean;

style?: StyleProp<ViewStyle>;

contentContainerStyle?: StyleProp<ViewStyle>;

imageContainerStyle?: StyleProp<ViewStyle>;

labelStyle?: StyleProp<TextStyle>;

imageStyle?: StyleProp<ImageStyle>;
}

```
38 changes: 38 additions & 0 deletions docs/docs/api/backdrop-subheader.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# BackdropSubheader

API documentation for the React Native BackdropSubheader component. Learn about the available props.

## Import

```js
import { BackdropSubheader } from "@react-native-material/core";
// or
import BackdropSubheader from "@react-native-material/core/BackdropSubheader";
```

## Props

```ts
interface BackdropSubheaderProps {
title?: string | React.ReactElement;

leading?: React.ReactElement | ((props: { color: string; size: number }) => React.ReactElement | null) | null;

trailing?: React.ReactElement | ((props: { color: string; size: number }) => React.ReactElement | null) | null;

divider?: boolean | React.ReactElement;

color?: PaletteColor;

style?: StyleProp<ViewStyle>;

contentContainerStyle?: StyleProp<ViewStyle>;

titleContainerStyle?: StyleProp<ViewStyle>;

leadingContainerStyle?: StyleProp<ViewStyle>;

trailingContainerStyle?: StyleProp<ViewStyle>;
}

```
42 changes: 42 additions & 0 deletions docs/docs/api/backdrop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Backdrop

API documentation for the React Native Backdrop component. Learn about the available props.

## Import

```js
import { Backdrop } from "@react-native-material/core";
// or
import Backdrop from "@react-native-material/core/Backdrop";
```

## Props

```ts
interface BackdropProps {
revealed?: boolean;

header?: React.ReactElement | null;

headerHeight?: number;

backLayer?: React.ReactElement | null;

backLayerHeight?: number;

subheader?: React.ReactElement | null;

subheaderHeight?: number;

style?: StyleProp<ViewStyle>;

headerContainerStyle?: StyleProp<ViewStyle>;

backLayerContainerStyle?: StyleProp<ViewStyle>;

frontLayerContainerStyle?: Animated.AnimatedProps<ViewProps>["style"];

subheaderContainerStyle?: StyleProp<ViewStyle>;
}

```
34 changes: 34 additions & 0 deletions docs/docs/api/badge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Badge

API documentation for the React Native Badge component. Learn about the available props.

## Import

```js
import { Badge } from "@react-native-material/core";
// or
import Badge from "@react-native-material/core/Badge";
```

## Props

```ts
interface BadgeProps {
label?: number | string | React.ReactElement | ((props: { color: string }) => React.ReactElement | null) | null;

showZero?: boolean;

max?: number;

visible?: boolean;

color?: PaletteColor;

tintColor?: PaletteColor;

style?: Animated.AnimatedProps<ViewProps>["style"];

labelStyle?: StyleProp<TextStyle>;
}

```
36 changes: 36 additions & 0 deletions docs/docs/api/banner.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Banner

API documentation for the React Native Banner component. Learn about the available props.

## Import

```js
import { Banner } from "@react-native-material/core";
// or
import Banner from "@react-native-material/core/Banner";
```

## Props

```ts
interface BannerProps {
text: string | React.ReactElement | null;

illustration?: React.ReactElement | ((props: { size: number }) => React.ReactElement | null) | null;

buttons: React.ReactElement | React.ReactElement[] | null;

style?: StyleProp<ViewStyle>;

contentContainerStyle?: StyleProp<ViewStyle>;

illustrationContainerStyle?: StyleProp<ViewStyle>;

textContainerStyle?: StyleProp<ViewStyle>;

textStyle?: StyleProp<TextStyle>;

actionsContainerStyle?: StyleProp<ViewStyle>;
}

```
50 changes: 50 additions & 0 deletions docs/docs/api/button.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Button

API documentation for the React Native Button component. Learn about the available props.

## Import

```js
import { Button } from "@react-native-material/core";
// or
import Button from "@react-native-material/core/Button";
```

## Props

```ts
interface ButtonProps extends SurfaceProps {
title: string | React.ReactElement | ((props: { color: string }) => React.ReactElement | null) | null;

leading?: React.ReactElement | ((props: { color: string; size: number }) => React.ReactElement | null) | null;

trailing?: React.ReactElement | ((props: { color: string; size: number }) => React.ReactElement | null) | null;

variant?: "contained" | "outlined" | "text";

color?: PaletteColor;

tintColor?: PaletteColor;

uppercase?: boolean;

compact?: boolean;

disableElevation?: boolean;

loading?: boolean;

loadingIndicator?: string | React.ReactElement | ((props: { color: string }) => React.ReactElement | null) | null;

loadingIndicatorPosition?: "leading" | "trailing" | "overlay";

titleStyle?: StyleProp<TextStyle>;

leadingContainerStyle?: StyleProp<ViewStyle>;

trailingContainerStyle?: StyleProp<ViewStyle>;

loadingOverlayContainerStyle?: StyleProp<ViewStyle>;
}

```
28 changes: 28 additions & 0 deletions docs/docs/api/divider.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Divider

API documentation for the React Native Divider component. Learn about the available props.

## Import

```js
import { Divider } from "@react-native-material/core";
// or
import Divider from "@react-native-material/core/Divider";
```

## Props

```ts
interface DividerProps {
color?: string | undefined;

inset?: number | undefined;

leadingInset?: number | undefined;

trailingInset?: number | undefined;

style?: StyleProp<ViewStyle> | undefined;
}

```
Loading

2 comments on commit b72bcba

@vercel
Copy link

@vercel vercel bot commented on b72bcba Nov 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on b72bcba Nov 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.