Skip to content

Commit

Permalink
Merge branch 'ev-add-pseudo-props-docs' into 'master'
Browse files Browse the repository at this point in the history
DOCS - Add pseudo props docs

See merge request amalgama/packages/npm/react-native-ui-kit!58
  • Loading branch information
maurobender committed Sep 29, 2022
2 parents 81ea3c2 + 69e0a3b commit a63c486
Show file tree
Hide file tree
Showing 7 changed files with 117 additions and 4 deletions.
36 changes: 35 additions & 1 deletion docs/docs/components/button.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,38 @@ An icon component to show at the right part of the button.

```tsx
<Button width="300px" variant="priority" rightIcon={<Icon name="close" />}>Block</Button>
```
```

## 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 |
26 changes: 26 additions & 0 deletions docs/docs/components/checkbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
2 changes: 1 addition & 1 deletion docs/docs/components/form_control.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/components/icon.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ import MyIconLib from './MyIconLib';

```

### inline way
### Inline way
```tsx
import { Path, Svg } from 'react-native-svg';
import AlertCircle from './AlertCircle';
Expand Down
10 changes: 10 additions & 0 deletions docs/docs/components/icon_button.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,13 @@ If the button is disabled or not. **Boolean**.
```tsx
<IconButton size="md" name="plus" disabled />
```

## Pseudo Props

### __icon

`Box` props to be applied to the internal `icon` component.

| TYPE | REQUIRED |
| ------ | -------- |
| IBoxProps | No |
26 changes: 26 additions & 0 deletions docs/docs/components/radio.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
19 changes: 18 additions & 1 deletion docs/docs/components/text_input.md
Original file line number Diff line number Diff line change
Expand Up @@ -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' }}
/>
```
```
## 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 |

0 comments on commit a63c486

Please sign in to comment.