From 69e0a3b45ade55bf2727ffb49ada1a243c1dc023 Mon Sep 17 00:00:00 2001 From: Enzo Vigneti Date: Wed, 28 Sep 2022 12:57:01 -0300 Subject: [PATCH] Add pseudo props docs --- docs/docs/components/button.md | 36 +++++++++++++++++++++++++++- docs/docs/components/checkbox.md | 26 ++++++++++++++++++++ docs/docs/components/form_control.md | 2 +- docs/docs/components/icon.md | 2 +- docs/docs/components/icon_button.md | 10 ++++++++ docs/docs/components/radio.md | 26 ++++++++++++++++++++ docs/docs/components/text_input.md | 19 ++++++++++++++- 7 files changed, 117 insertions(+), 4 deletions(-) diff --git a/docs/docs/components/button.md b/docs/docs/components/button.md index e9a335f..8f7f2d3 100644 --- a/docs/docs/components/button.md +++ b/docs/docs/components/button.md @@ -102,4 +102,38 @@ An icon component to show at the right part of the button. ```tsx -``` \ No newline at end of file +``` + +## Pseudo Props + +### __label + +Props to be applied to the internal `Text` component showing the label text. + +| TYPE | REQUIRED | +| ------ | -------- | +| ITextProps | No | + +### __stack + +Props to be applied to the internal `Stack` component which contains the label and the icons. + +| TYPE | REQUIRED | +| ------ | -------- | +| IStackProps | No | + +### __leftIcon + +Props to be applied to the internal `Icon` component showing the left icon. + +| TYPE | REQUIRED | +| ------ | -------- | +| IIconProps | No | + +### __rightIcon + +Props to be applied to the internal `Icon` component showing the right icon. + +| TYPE | REQUIRED | +| ------ | -------- | +| IIconProps | No | diff --git a/docs/docs/components/checkbox.md b/docs/docs/components/checkbox.md index a7e7406..2134d34 100644 --- a/docs/docs/components/checkbox.md +++ b/docs/docs/components/checkbox.md @@ -273,3 +273,29 @@ const ExampleCheckboxGroup = () => { ); }; ``` + +## Pseudo Props + +### __icon + +Props to be applied to the internal `Icon` component showing the right icon. + +| TYPE | REQUIRED | +| ------ | -------- | +| IIconProps | No | + +### __iconContainer + +Props to be applied to the internal `Box` component which contains the label and the icons. + +| TYPE | REQUIRED | +| ------ | -------- | +| IBoxProps | No | + +### __label + +Props to be applied to the internal `Text` component showing the label text. + +| TYPE | REQUIRED | +| ------ | -------- | +| ITextProps | No | \ No newline at end of file diff --git a/docs/docs/components/form_control.md b/docs/docs/components/form_control.md index ef63604..80dabd6 100644 --- a/docs/docs/components/form_control.md +++ b/docs/docs/components/form_control.md @@ -147,7 +147,7 @@ Shows an error text below the input. If the `hint` and `error` props are both provided, the `error` text takes precedence over the `hint` one. ::: -## Pseudo-props +## Pseudo Props ### __label Props to be applied to the internal `Text` component showing the label. diff --git a/docs/docs/components/icon.md b/docs/docs/components/icon.md index cdcbf1d..22e0cc3 100644 --- a/docs/docs/components/icon.md +++ b/docs/docs/components/icon.md @@ -183,7 +183,7 @@ import MyIconLib from './MyIconLib'; ``` -### inline way +### Inline way ```tsx import { Path, Svg } from 'react-native-svg'; import AlertCircle from './AlertCircle'; diff --git a/docs/docs/components/icon_button.md b/docs/docs/components/icon_button.md index f32abad..5d0916c 100644 --- a/docs/docs/components/icon_button.md +++ b/docs/docs/components/icon_button.md @@ -143,3 +143,13 @@ If the button is disabled or not. **Boolean**. ```tsx ``` + +## Pseudo Props + +### __icon + +`Box` props to be applied to the internal `icon` component. + +| TYPE | REQUIRED | +| ------ | -------- | +| IBoxProps | No | \ No newline at end of file diff --git a/docs/docs/components/radio.md b/docs/docs/components/radio.md index 3480c14..b8550aa 100644 --- a/docs/docs/components/radio.md +++ b/docs/docs/components/radio.md @@ -238,3 +238,29 @@ const ExampleRadioGroup = () => { ); }; ``` + +## Pseudo Props + +### __icon + +Props to be applied to the internal `Icon` component showing the right icon. + +| TYPE | REQUIRED | +| ------ | -------- | +| IIconProps | No | + +### __iconContainer + +Props to be applied to the internal `Box` component which contains the label and the icons. + +| TYPE | REQUIRED | +| ------ | -------- | +| IBoxProps | No | + +### __label + +Props to be applied to the internal `Text` component showing the label text. + +| TYPE | REQUIRED | +| ------ | -------- | +| ITextProps | No | diff --git a/docs/docs/components/text_input.md b/docs/docs/components/text_input.md index ed31861..fb1eadd 100644 --- a/docs/docs/components/text_input.md +++ b/docs/docs/components/text_input.md @@ -220,4 +220,21 @@ Props to be applied to the internal `IconButton` component that toggles the pass width="300px" __icon={{ name: 'lock', as: Feather, size: 'sm' }} /> -``` \ No newline at end of file +``` +## Pseudo Props + +### __icon + +Props to be applied to the internal `icon` component. + +| TYPE | REQUIRED | +| ------ | -------- | +| IIconProps | No | + +### __textInput + +`Box` props to be applied to the internal `text input` component. + +| TYPE | REQUIRED | +| ------ | -------- | +| IBoxProps | No | \ No newline at end of file