Skip to content

Commit

Permalink
refactor(errors): remove errors statements
Browse files Browse the repository at this point in the history
  • Loading branch information
Guribeiro committed Oct 2, 2024
1 parent 38ea0c0 commit d8951fa
Show file tree
Hide file tree
Showing 13 changed files with 151 additions and 10,216 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
*.pbxproj -text
# specific for windows script files
*.bat text eol=crlf
*.bat text eol=crlf
2 changes: 1 addition & 1 deletion .watchmanconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{}
{}
21 changes: 10 additions & 11 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# Contributor Covenant Code of Conduct

## Our Pledge
Expand All @@ -18,23 +17,23 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
- Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of
- The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities
Expand Down
1 change: 0 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ Remember to add tests for your change if possible. Run the unit tests by:
yarn test
```


### Commit message convention

We follow the [conventional commits specification](https://www.conventionalcommits.org/en) for our commit messages:
Expand Down
163 changes: 71 additions & 92 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ This is customizable Modal Select for your React Native and Expo application.
```
npm install react-native-expo-modal-select
```

or

```
yarn add react-native-expo-modal-select
```


## Usage

```js
Expand Down Expand Up @@ -58,189 +59,167 @@ const styles = StyleSheet.create({
backgroundColor: '#ddd',
},
});

```

## Reference

### testID
id for testing

| Type | Required | Default |
| ----- | -------- | ------- |
| string | No | undefined |

---

### label
display a text label for describing the select component

| Type | Required | Default |
| ----- | -------- | ------- |
| string | No | undefined |

---
id for testing

### required
display `*` for required fields

| Type | Required | Default |
| ----- | -------- | ------- |
| boolean | No | false |
| Type | Required | Default |
| ------ | -------- | --------- |
| string | No | undefined |

---

### items

array of `Item` that will be represented in modal as all the options that could be selected

| Type | Required | Default |
| ----- | -------- | ------- |
| array | Yes | |
| array | Yes | [] |

---

### value

selected item in modal select

| Type | Required | Default |
| -------- | -------- | ------- |
| string | Yes | |
| Type | Required | Default |
| ------ | -------- | ------- |
| string | Yes | |

---

### placeholder

text that will be displayed inside the touchable

| Type | Required | Default |
| -------- | -------- | ------- |
| string | No | undefined |
| Type | Required | Default |
| ------ | -------- | --------- |
| string | No | undefined |

---

### touchableStyle

style object for touchable

| Type | Required | Default |
| -------- | -------- | ------- |
| object | No | undefined |
| Type | Required | Default |
| ------ | -------- | --------- |
| object | No | undefined |

---

### touchableTextStyle

style object for text inside touchable

| Type | Required | Default |
| -------- | -------- | ------- |
| object | No | undefined |
| Type | Required | Default |
| ------ | -------- | --------- |
| object | No | undefined |

---

### itemTouchableStyle

style object for select item touchable

| Type | Required | Default |
| -------- | -------- | ------- |
| object | No | undefined |
| Type | Required | Default |
| ------ | -------- | --------- |
| object | No | undefined |

---

### itemTextStyle
style object for select item text

| Type | Required | Default |
| -------- | -------- | ------- |
| object | No | undefined |

---

### errorTextStyle
style object for error text

| Type | Required | Default |
| -------- | -------- | ------- |
| object | No | undefined |

---

### labelStyle
style object for label text
style object for select item text

| Type | Required | Default |
| -------- | -------- | ------- |
| object | No | undefined |
| Type | Required | Default |
| ------ | -------- | --------- |
| object | No | undefined |

---

### modalStyle

style object for customizing modal

| Type | Required | Default |
| -------- | -------- | ------- |
| object | No | undefined |
| Type | Required | Default |
| ------ | -------- | --------- |
| object | No | undefined |

---

### modalTitleStyle

style object for modal title text

| Type | Required | Default |
| -------- | -------- | ------- |
| object | No | undefined |
| Type | Required | Default |
| ------ | -------- | --------- |
| object | No | undefined |

---

### showErrorMessage
when false, hide the error message keeping the error style.

| Type | Required | Default |
| -------- | -------- | ------- |
| boolean | No | true |

---
### closeTextStyle

### errorColor
defines the error used when has an error
style object for modal close button text

| Type | Required | Default |
| -------- | -------- | ------- |
| string | No | #e74c3c |
| Type | Required | Default |
| ------ | -------- | --------- |
| object | No | undefined |

---

### closeTextStyle
style object for modal close button text
### closeModalText

| Type | Required | Default |
| -------- | -------- | ------- |
| object | No | undefined |
style object for modal cancel button text

| Type | Required | Default |
| ------ | -------- | ------- |
| string | No | Back |

---

### cancelTextStyle

style object for modal cancel button text

| Type | Required | Default |
| -------- | -------- | ------- |
| object | No | undefined |
| Type | Required | Default |
| ------ | -------- | --------- |
| object | No | undefined |

---

### cancelTouchableText

text that will be displayed inside the cancel touchable

| Type | Required | Default |
| -------- | -------- | ------- |
| string | No | Cancel |
| Type | Required | Default |
| ------ | -------- | ------- |
| string | No | Cancel |

---

### emptyIndicatorText

text that will be displayed inside the empty indicator

| Type | Required | Default |
| -------- | -------- | ------- |
| Type | Required | Default |
| -------- | -------- | ---------------------------------------- |
| function | Yes | Sorry, there is nothing to be shown here |

---

### CloseModalComponent

text that will be displayed inside the empty indicator

| Type | Required | Default |
| --------------- | -------- | --------- |
| React Component | No | undefined |

## Contributing

Expand Down
4 changes: 1 addition & 3 deletions example/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"assetBundlePatterns": [
"**/*"
],
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": true
},
Expand Down
6 changes: 3 additions & 3 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
"web": "expo start --web"
},
"dependencies": {
"expo": "~50.0.8",
"expo-status-bar": "1.11.1",
"expo": "~51.0.35",
"expo-status-bar": "~1.12.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.73.4",
"react-native": "0.74.5",
"react-native-expo-modal-select": "^0.1.1",
"react-native-web": "~0.19.6",
"yarn": "^1.22.21"
Expand Down
1 change: 0 additions & 1 deletion example/src/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export default function Select() {
return (
<View style={styles.container}>
<ModalSelect
label="country"
placeholder="Select your country"
items={countries}
value={country}
Expand Down
Loading

0 comments on commit d8951fa

Please sign in to comment.