diff --git a/docs/ignite-cli/_category_.json b/docs/ignite-cli/_category_.json
index d5208722..38fcbc41 100644
--- a/docs/ignite-cli/_category_.json
+++ b/docs/ignite-cli/_category_.json
@@ -1,8 +1,8 @@
{
- "label": "Ignite",
+ "label": "ignite-cli",
"link": null,
"customProps": {
- "description": "Infinite Red's hottest boilerplate for React Native.",
+ "description": "",
"projectName": "ignite-cli",
"sidebar": {
"type": "autogenerated",
diff --git a/docs/ignite-cli/boilerplate/app/components/AutoImage.md b/docs/ignite-cli/boilerplate/app/components/AutoImage.md
index b53d6aa5..14975e34 100644
--- a/docs/ignite-cli/boilerplate/app/components/AutoImage.md
+++ b/docs/ignite-cli/boilerplate/app/components/AutoImage.md
@@ -6,9 +6,15 @@ sidebar_position: 30
Ignite's `AutoImage` Component is an enhanced version of the built-in React Native [Image](https://reactnative.dev/docs/image) component. It automatically resizes the image view to fit a max width or height constraint
+
+
+# Usage
+
```tsx
```
@@ -16,7 +22,7 @@ Ignite's `AutoImage` Component is an enhanced version of the built-in React Nati
`AutoImage` uses a `useAutoImage` hook to calculate the image's dimensions when you have a specific values you need to constrain the image within. This hook is also available for use in your own components.
```tsx
-const { width, height } = useAutoImage(uri, maxWidth, maxHeight)
+const { width, height } = useAutoImage(uri, maxWidth, maxHeight);
```
## Props
@@ -29,7 +35,9 @@ These props are used to constrain the image to a specific size. Use `maxWidth` o
```tsx
diff --git a/docs/ignite-cli/boilerplate/app/components/Button.md b/docs/ignite-cli/boilerplate/app/components/Button.md
index 458bfa82..585f5f7e 100644
--- a/docs/ignite-cli/boilerplate/app/components/Button.md
+++ b/docs/ignite-cli/boilerplate/app/components/Button.md
@@ -6,6 +6,10 @@ sidebar_position: 31
The `Button` component is a wrapper around the [`Pressable`](https://reactnative.dev/docs/pressable) component. Any prop that can be passed to `Pressable` can be passed to `Button` and it will be forwarded. `Button` renders a button with given text in a [`Text`](./Text.md) component or children. It allows you to specify the preset style of the button, you can override both the `Pressable` and `Text` styles.
+
+
+# Usage
+
```tsx
,
-}
+ danger: [
+ $baseViewStyle,
+ { backgroundColor: colors.palette.angry500 },
+ ] as StyleProp,
+};
const $textPresets: Record> = {
// ...
- danger: [$baseTextStyle, { color: colors.palette.angry500 }] as StyleProp,
-}
+ danger: [
+ $baseTextStyle,
+ { color: colors.palette.angry500 },
+ ] as StyleProp,
+};
const $pressedViewPresets: Record> = {
// ...
danger: { backgroundColor: colors.palette.angry500 },
-}
+};
const $pressedTextPresets: Record> = {
angry: { opacity: 0.7 },
-}
+};
```
```tsx
@@ -139,7 +149,11 @@ The `LeftAccessory` and `RightAccessory` props are optional. They can be used to
```tsx
(
-
+
)}
/>
```
@@ -147,7 +161,11 @@ The `LeftAccessory` and `RightAccessory` props are optional. They can be used to
```tsx
(
-
+
)}
/>
```
@@ -159,9 +177,9 @@ If the accessories flicker when some prop or state changes, you can memoize the
LeftAccessory={useMemo(
() =>
function LeftIcon(props: ButtonAccessoryProps) {
- return
+ return ;
},
- [],
+ []
)}
/>
```
diff --git a/docs/ignite-cli/boilerplate/app/components/Card.md b/docs/ignite-cli/boilerplate/app/components/Card.md
index 71462a87..10937f48 100644
--- a/docs/ignite-cli/boilerplate/app/components/Card.md
+++ b/docs/ignite-cli/boilerplate/app/components/Card.md
@@ -30,14 +30,27 @@ The `Card` component is intended to be used for vertically aligned related conte
The `preset` prop is used to set the preset container style of the card. This affects the border and background color of the container. There are two preconfigured presets: `default` and `reversed`.
+
+
+### Usage
+
```tsx
-
+
```
### `verticalAlignment`
The `verticalAlignment` prop is used to set the vertical alignment of the card's content. This affects the alignment of the heading, content, and footer. There are four preconfigured alignments: `top`, `center`, `space-between`, and `force-footer-bottom`. `force-footer-bottom` behaves like `top`, but will force the footer to the bottom of the card.
+
+
+### Usage
+
```tsx
}
RightComponent={
- Alert.alert("pressed")} />
+ Alert.alert("pressed")}
+ />
}
heading="Card Heading"
content="Card Content"
@@ -133,7 +154,9 @@ The `HeadingComponent` prop is used to set the component that will be used for t
```tsx
}
+ HeadingComponent={
+
+ }
content="Card Content"
footer="Card Footer"
/>
@@ -176,7 +199,10 @@ The `contentStyle` prop is used to set the style of the content text.
```
@@ -201,7 +227,9 @@ The `ContentComponent` prop is used to set the component that will be used for t
```tsx
}
+ ContentComponent={
+
+ }
footer="Card Footer"
/>
```
@@ -269,6 +297,8 @@ The `FooterComponent` prop is used to set the component that will be used for th
}
+ FooterComponent={
+
+ }
/>
```
diff --git a/docs/ignite-cli/boilerplate/app/components/EmptyState.md b/docs/ignite-cli/boilerplate/app/components/EmptyState.md
index 2ea3cbd5..b6d23054 100644
--- a/docs/ignite-cli/boilerplate/app/components/EmptyState.md
+++ b/docs/ignite-cli/boilerplate/app/components/EmptyState.md
@@ -30,8 +30,16 @@ The `EmptyState` component is to be used when there is no data to display, usual
The `preset` prop is used to set the preset container style of the EmptyState. This affects the default image, heading, content and button. Currently, only one preconfigured preset exists: `generic`.
+
+
+### Usage
+
```tsx
-
+
```
### `style`
@@ -89,7 +97,11 @@ The `ImageProps` prop is used to pass any additional props directly to the `Imag
The `heading` prop is used to set the heading text of the EmptyState.
```tsx
-
+
```
### `headingTx`
@@ -148,7 +160,11 @@ The `HeadingTextProps` prop is used to pass any additional props to the heading
The `content` prop is used to set the content text of the EmptyState.
```tsx
-
+
```
### `contentTx`
@@ -184,7 +200,10 @@ The `contentStyle` prop is used to set the style of the content text.
```
@@ -207,7 +226,11 @@ The `ContentTextProps` prop is used to pass any additional props to the content
The `button` prop is used to set the button text of the EmptyState.
```tsx
-
+
```
### `buttonTx`
diff --git a/docs/ignite-cli/boilerplate/app/components/Header.md b/docs/ignite-cli/boilerplate/app/components/Header.md
index 16faa2f6..8211f849 100644
--- a/docs/ignite-cli/boilerplate/app/components/Header.md
+++ b/docs/ignite-cli/boilerplate/app/components/Header.md
@@ -6,6 +6,10 @@ sidebar_position: 34
The `Header` component is a component that will appear at the top of your screen. It is used to hold navigation buttons and the screen title.
+
+
+### Usage
+
```tsx
`](https://reactnative.dev/docs/view-style-props) object.
```tsx
-
+
```
### `containerStyle`
@@ -66,7 +73,11 @@ The `style` prop is an optional prop that is used to set the style of the header
The `backgroundColor` prop is an optional prop that is used to set the background color of the header's outer container.
```tsx
- navigation.goBack()} backgroundColor="purple" />
+ navigation.goBack()}
+ backgroundColor="purple"
+/>
```
### `title`
@@ -74,7 +85,11 @@ The `backgroundColor` prop is an optional prop that is used to set the backgroun
The `title` is an optional prop that is used to set the header title. If this is not set, the `titleTx` prop must be present to set the title. If both are set, the `title` value will be used.
```tsx
- navigation.goBack()} />
+ navigation.goBack()}
+/>
```
### `titleTx`
@@ -82,7 +97,11 @@ The `title` is an optional prop that is used to set the header title. If this is
The `titleTx` is an optional prop that is used to lookup the translation for the header title. If this is not set, the `title` prop must be present to set the header title. If both are set, the `title` value will be used.
```tsx
- navigation.goBack()} />
+ navigation.goBack()}
+/>
```
### `titleTxOptions`
@@ -103,7 +122,11 @@ The `titleTxOptions` is an optional prop that is used to pass props to the trans
The `leftIcon` is an optional prop that is used to set the icon for the left navigation button. Options are 'back', 'bullet', and 'bug'. Custom icons can be created by using the [`Icon` component](./Icon.md#custom-icons). Once you create a custom icon, just pass the string name of the icon to the `leftIcon` prop.
```tsx
- navigation.goBack()} />
+ navigation.goBack()}
+/>
```
### `leftIconColor`
@@ -124,7 +147,11 @@ The `leftIconColor` is an optional prop that is used to set the tint color of th
The `leftText` is an optional prop that is used to set the text for the left navigation button. Overrides the `leftIcon` prop.
```tsx
- navigation.goBack()} />
+ navigation.goBack()}
+/>
```
### `leftTx`
@@ -132,7 +159,11 @@ The `leftText` is an optional prop that is used to set the text for the left nav
The `leftTx` is an optional prop that is used to lookup the translation for the left navigation button. Overrides the `leftIcon` and `leftText` prop`.
```tsx
- navigation.goBack()} />
+ navigation.goBack()}
+/>
```
### `leftTxOptions`
@@ -161,7 +192,11 @@ The `LeftActionComponent` is an optional `ReactElement` prop that is used to set
The `onLeftPress` is an optional prop that is used to set the function to be called when the left navigation button is pressed.
```tsx
- navigation.goBack()} />
+ navigation.goBack()}
+/>
```
### `rightIcon`
@@ -169,7 +204,11 @@ The `onLeftPress` is an optional prop that is used to set the function to be cal
The `rightIcon` is an optional prop that is used to set the icon for the right navigation button. Custom icons can be created by using the [`Icon` component](./Icon.md#custom-icons). Once you create a custom icon, just pass the string name of the icon to the `rightIcon` prop.
```tsx
- navigation.goBack()} />
+ navigation.goBack()}
+/>
```
### `rightIconColor`
@@ -190,7 +229,11 @@ The `rightIconColor` is an optional prop that is used to set the tint color of t
The `rightText` is an optional prop that is used to set the text for the right navigation button. Overrides the `rightIcon` prop.
```tsx
- navigation.goBack()} />
+ navigation.goBack()}
+/>
```
### `rightTx`
@@ -198,7 +241,11 @@ The `rightText` is an optional prop that is used to set the text for the right n
The `rightTx` is an optional prop that is used to lookup the translation for the right navigation button. Overrides the `rightIcon` and `rightText` prop`.
```tsx
- navigation.goBack()} />
+ navigation.goBack()}
+/>
```
### `rightTxOptions`
@@ -227,7 +274,11 @@ The `RightActionComponent` is an optional `ReactElement` prop that is used to se
The `onRightPress` is an optional prop that is used to set the function to be called when the right navigation button is pressed.
```tsx
- navigation.goBack()} />
+ navigation.goBack()}
+/>
```
### `safeAreaEdges`
@@ -248,16 +299,16 @@ This method gives you the most control over your Header and co-locates the logic
```tsx
function AccountScreen(props) {
- const { navigation } = props
+ const { navigation } = props;
useLayoutEffect(() => {
navigation.setOptions({
headerShown: true,
header: () => ,
- })
- }, [])
+ });
+ }, []);
- return
+ return ;
}
```
@@ -267,9 +318,9 @@ A convenience [`useHeader`](../utils/useHeader.tsx.md) hook is provided that abs
function AccountScreen(props) {
useHeader({
title: "Hello",
- })
+ });
- return
+ return ;
}
```
@@ -283,7 +334,7 @@ function AccountScreen(props) {
- )
+ );
}
```
@@ -296,7 +347,9 @@ If your Header shares a lot of the same logic within a navigator, it might be a
```tsx
,
+ header: (props) => (
+
+ ),
}}
/>
```
diff --git a/docs/ignite-cli/boilerplate/app/components/Icon.md b/docs/ignite-cli/boilerplate/app/components/Icon.md
index 51b73387..46a787c6 100644
--- a/docs/ignite-cli/boilerplate/app/components/Icon.md
+++ b/docs/ignite-cli/boilerplate/app/components/Icon.md
@@ -6,6 +6,10 @@ sidebar_position: 35
Ignite's `Icon` Component renders an icon using predefined icon images. You can use those, override them, or customize this component to create any number of image based icons. If `onPress` is passed, it will wrap the icon in a [`TouchableOpacity`](https://reactnative.dev/docs/touchableopacity) component, otherwise it will use a [`View`](https://reactnative.dev/docs/view) component.
+
+
+### Usage
+
```tsx
Alert.alert("Hello")} />
```
@@ -98,7 +102,7 @@ To create your own custom icon, add your icon image(s) to the `assets/icons/` di
export const iconRegistry = {
// ...
custom: require("./myCustomIcon.png"),
-}
+};
```
You can then use your custom icon by passing its name through the `icon` prop.
diff --git a/docs/ignite-cli/boilerplate/app/components/ListItem.md b/docs/ignite-cli/boilerplate/app/components/ListItem.md
index be2c87a2..c739fee2 100644
--- a/docs/ignite-cli/boilerplate/app/components/ListItem.md
+++ b/docs/ignite-cli/boilerplate/app/components/ListItem.md
@@ -6,6 +6,10 @@ sidebar_position: 36
The `ListItem` component is a component that is used to display a single item in a list. It provides a lot of flexibility in terms of what you can do with it. It can be used to display a simple piece text, or a complex component with multiple actionable and custom styled elements inside.
+
+
+### Usage
+
```tsx
```
diff --git a/docs/ignite-cli/boilerplate/app/components/Text.md b/docs/ignite-cli/boilerplate/app/components/Text.md
index 53ef2473..f5dfdaed 100644
--- a/docs/ignite-cli/boilerplate/app/components/Text.md
+++ b/docs/ignite-cli/boilerplate/app/components/Text.md
@@ -8,6 +8,8 @@ Ignite's `Text` Component is an enhanced version of the built-in React Native [`
By enhancing the Ignite Text component and using it across your app, you can make sure the right fonts, font weight, and other styles and behaviors are shared across your whole app.
+
+
## Props
### `text`
@@ -35,7 +37,7 @@ The `txOptions` optional prop is an object of options to pass to i18n. Useful fo
```tsx
// in en.json
profile: {
- details: "{{name}} who is {{age}} years old"
+ details: "{{name}} who is {{age}} years old";
}
```
@@ -114,8 +116,12 @@ Feel free to add your own presets by emulating the style you see with the provid
```tsx
$presets = {
- label: [$baseStyle, $sizeStyles.md, $fontWeightStyles.medium] as StyleProp,
-}
+ label: [
+ $baseStyle,
+ $sizeStyles.md,
+ $fontWeightStyles.medium,
+ ] as StyleProp,
+};
```
```tsx
diff --git a/docs/ignite-cli/boilerplate/app/components/TextField.md b/docs/ignite-cli/boilerplate/app/components/TextField.md
index fc4df40e..24998c3b 100644
--- a/docs/ignite-cli/boilerplate/app/components/TextField.md
+++ b/docs/ignite-cli/boilerplate/app/components/TextField.md
@@ -8,6 +8,10 @@ Ignite's `TextField` Component is an enhanced version of the built-in React Nati
With this component you will be able to standardise TextInput component across your app.
+
+
+### Usage
+
```tsx
import { TextField } from '../components';
@@ -45,7 +49,11 @@ The `TextField` component accepts all the props of the built-in React Native [`T
The `status` prop is used to set an `'error'` or `'disabled'` state on the component. The default value is `null`. You can use it to show an error style for validations or to disable the component. By default the `'error'` status will set the `borderColor` on the input wrapper to whatever `colors.error` is set to. Setting the status to `'disabled'` will disable editing on the `TextInput` component.
```tsx
- setInput(value)} status="error" />
+ setInput(value)}
+ status="error"
+/>
```
### `label`
@@ -53,7 +61,11 @@ The `status` prop is used to set an `'error'` or `'disabled'` state on the compo
The `label` optional prop is a string that is used to set the label. If this is not set, the `labelTx` prop must be present to set the label. If both are set, the `label` value will be used.
```tsx
- setInput(value)} label="Name" />
+ setInput(value)}
+ label="Name"
+/>
```
### `labelTx`
@@ -61,7 +73,11 @@ The `label` optional prop is a string that is used to set the label. If this is
The `labelTx` optional prop is the string key used to look up the translated text for the user's locale. Ignite uses [`i18n-js`](http://i18njs.com/) for internationalization. If this is not set, the `label` prop must be present to set the label. If both are set, the `label` value will be used.
```tsx
- setInput(value)} labelTx="signup.name" />
+ setInput(value)}
+ labelTx="signup.name"
+/>
```
### `labelTxOptions`
@@ -95,7 +111,11 @@ The `LabelTextProps` is an optional prop that is used to pass props to the [`Tex
The `helper` optional prop is a string that is used to set the helper text. If this is not set, the `helperTx` prop must be present to set the helper text. If both are set, the `helper` value will be used. The helper text is rendered with a [`Text`](./Text.md) component.
```tsx
- setInput(value)} helper="This is a helper text" />
+ setInput(value)}
+ helper="This is a helper text"
+/>
```
### `helperTx`
@@ -103,7 +123,11 @@ The `helper` optional prop is a string that is used to set the helper text. If t
The `helperTx` optional prop is the string key used to look up the translated text for the user's locale. Ignite uses [`i18n-js`](http://i18njs.com/) for internationalization. If this is not set, the `helper` prop must be present to set the helper text. If both are set, the `helper` value will be used.
```tsx
- setInput(value)} helperTx="signup.name" />
+ setInput(value)}
+ helperTx="signup.name"
+/>
```
### `helperTxOptions`
@@ -137,7 +161,11 @@ The `HelperTextProps` is an optional prop that is used to pass props to the [`Te
The `placeholder` optional prop is a string that is used to set the placeholder. If this is not set, the `placeholderTx` prop must be present to set the placeholder. If both are set, the `placeholder` value will be used.
```tsx
- setInput(value)} placeholder="Name" />
+ setInput(value)}
+ placeholder="Name"
+/>
```
### `placeholderTx`
@@ -145,7 +173,11 @@ The `placeholder` optional prop is a string that is used to set the placeholder.
The `placeholderTx` optional prop is the string key used to look up the translated text for the user's locale. Ignite uses [`i18n-js`](http://i18njs.com/) for internationalization. If this is not set, the `placeholder` prop must be present to set the placeholder. If both are set, the `placeholder` value will be used.
```tsx
- setInput(value)} placeholderTx="signup.name" />
+ setInput(value)}
+ placeholderTx="signup.name"
+/>
```
### `placeholderTxOptions`
@@ -225,10 +257,10 @@ const PasswordRightAccessory = useMemo(
containerStyle={props.style}
onPress={() => setIsAuthPasswordHidden(!isAuthPasswordHidden)}
/>
- )
+ );
},
- [isAuthPasswordHidden],
-)
+ [isAuthPasswordHidden]
+);
```
This could then be passed to the `TextField` component directly.
diff --git a/docs/ignite-cli/boilerplate/app/components/Toggle.md b/docs/ignite-cli/boilerplate/app/components/Toggle.md
index 2b0ff12d..23f8f4f1 100644
--- a/docs/ignite-cli/boilerplate/app/components/Toggle.md
+++ b/docs/ignite-cli/boilerplate/app/components/Toggle.md
@@ -6,6 +6,8 @@ sidebar_position: 41
This component is a flexible component that can be used to toggle a boolean value. It can be used to render a switch, checkbox, or radio button, and exposes style props for every element.
+
+
## Props
### `variant`
@@ -55,7 +57,11 @@ The `onValueChange` prop is a callback that is called when the toggle is toggled
The `containerStyle` prop is a style object that is applied to the container of the toggle.
```tsx
-
+
```
### `inputOuterStyle`
@@ -63,7 +69,11 @@ The `containerStyle` prop is a style object that is applied to the container of
The `inputOuterStyle` prop is a style object that is applied to the outer container of the toggle input. This gives the inputs their size, shape, "off" background-color, and outer border.
```tsx
-
+
```
### `inputInnerStyle`
@@ -71,7 +81,11 @@ The `inputOuterStyle` prop is a style object that is applied to the outer contai
The `inputInnerStyle` prop is a style object that is applied to the inner container of the toggle input. This gives the inputs their "on" background-color and inner border.
```tsx
-
+
```
### `inputDetailStyle`
@@ -79,7 +93,11 @@ The `inputInnerStyle` prop is a style object that is applied to the inner contai
The `inputDetailStyle` prop is a style object that is applied to the detail container of the toggle input. For checkbox, this affects the Image component. For radio, this affects the dot View. For switch, this affects the knob View.
```tsx
-
+
```
### `labelPosition`
@@ -103,7 +121,11 @@ The `label` prop is a string that is used as the label for the toggle.
The `labelTx` prop is a key to a string in the `i18n` translation file. It is used as the label for the toggle.
```tsx
-
+
```
### `labelTxOptions`
@@ -132,7 +154,11 @@ The `labelStyle` prop is a `StyleProp` object that is applied to the
The `LabelTextProps` prop is a `TextProps` object (from the [`Text`](./Text.md)) component that is applied to the label.
```tsx
-
+
```
### `helper`
@@ -148,7 +174,11 @@ The `helper` prop is a string that is used as the helper for the toggle.
The `helperTx` prop is a key to a string in the `i18n` translation file. It is used as the helper for the toggle.
```tsx
-
+
```
### `helperTxOptions`
@@ -169,7 +199,11 @@ The `helperTxOptions` prop is an object that is passed to the `i18n` translation
The `HelperTextProps` prop is a `TextProps` object (from the [`Text`](./Text.md)) component that is applied to the helper.
```tsx
-
+
```
### `switchAccessibilityMode`
@@ -177,7 +211,12 @@ The `HelperTextProps` prop is a `TextProps` object (from the [`Text`](./Text.md)
The `switchAccessibilityMode` is a special prop for the switch variant that adds a text/icon label for on/off states. Options are `text` and `icon`
```tsx
-
+
```
### `checkboxIcon`
diff --git a/static/img/autoimage-component.png b/static/img/autoimage-component.png
new file mode 100644
index 00000000..19f20406
Binary files /dev/null and b/static/img/autoimage-component.png differ
diff --git a/static/img/button-component.png b/static/img/button-component.png
new file mode 100644
index 00000000..5f59bbae
Binary files /dev/null and b/static/img/button-component.png differ
diff --git a/static/img/card-component-01.png b/static/img/card-component-01.png
new file mode 100644
index 00000000..5cdd6cb3
Binary files /dev/null and b/static/img/card-component-01.png differ
diff --git a/static/img/card-component-02.png b/static/img/card-component-02.png
new file mode 100644
index 00000000..371bca14
Binary files /dev/null and b/static/img/card-component-02.png differ
diff --git a/static/img/card-component-03.png b/static/img/card-component-03.png
new file mode 100644
index 00000000..5a42a684
Binary files /dev/null and b/static/img/card-component-03.png differ
diff --git a/static/img/empty-state.png b/static/img/empty-state.png
new file mode 100644
index 00000000..20a9c173
Binary files /dev/null and b/static/img/empty-state.png differ
diff --git a/static/img/header-component.png b/static/img/header-component.png
new file mode 100644
index 00000000..fe66859d
Binary files /dev/null and b/static/img/header-component.png differ
diff --git a/static/img/icon-component.png b/static/img/icon-component.png
new file mode 100644
index 00000000..9777845c
Binary files /dev/null and b/static/img/icon-component.png differ
diff --git a/static/img/listitem-component.png b/static/img/listitem-component.png
new file mode 100644
index 00000000..b1babf6a
Binary files /dev/null and b/static/img/listitem-component.png differ
diff --git a/static/img/text-component.png b/static/img/text-component.png
new file mode 100644
index 00000000..20cf1c1a
Binary files /dev/null and b/static/img/text-component.png differ
diff --git a/static/img/textfield-component.png b/static/img/textfield-component.png
new file mode 100644
index 00000000..ee3b4c63
Binary files /dev/null and b/static/img/textfield-component.png differ
diff --git a/static/img/toggle-component.png b/static/img/toggle-component.png
new file mode 100644
index 00000000..55af2316
Binary files /dev/null and b/static/img/toggle-component.png differ