From 20d0ff83f6c7db3c8ea20d08b4afab2275c92beb Mon Sep 17 00:00:00 2001 From: testshallpass Date: Mon, 3 Jan 2022 21:41:16 -0500 Subject: [PATCH] fix linter issues --- DropdownAlert.js | 8 ++++---- Example/App.js | 15 +++++++++------ docs/PROPS.md | 2 +- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/DropdownAlert.js b/DropdownAlert.js index 8b9025ab..518f6f97 100644 --- a/DropdownAlert.js +++ b/DropdownAlert.js @@ -512,11 +512,11 @@ export default class DropdownAlert extends Component { const src = isRemote ? {uri: source} : source; return ; }; - _renderTitle = title => { + _renderTitle = (title) => { if (this.props.renderTitle) { return this.props.renderTitle(this.props, this.alertData); } - if (!title || title.length == 0) { + if (!title || title.length === 0) { return null; } const {titleTextProps, titleStyle, titleNumOfLines} = this.props; @@ -529,11 +529,11 @@ export default class DropdownAlert extends Component { ); }; - _renderMessage = message => { + _renderMessage = (message) => { if (this.props.renderMessage) { return this.props.renderMessage(this.props, this.alertData); } - if (!message || message.length == 0) { + if (!message || message.length === 0) { return null; } const {messageTextProps, messageStyle, messageNumOfLines} = this.props; diff --git a/Example/App.js b/Example/App.js index 7526454e..df174e43 100644 --- a/Example/App.js +++ b/Example/App.js @@ -17,17 +17,20 @@ const App = () => { { color: Color.info, type: 'info', - message: 'System maintenance starts at midnight. System will be down for approximately 3 hours.', + message: + 'System maintenance starts at midnight. System will be down for approximately 3 hours.', }, { color: Color.warn, type: 'warn', - message: 'Warning: Low disk space. Please add more at your earliest convenience.', + message: + 'Warning: Low disk space. Please add more at your earliest convenience.', }, { color: Color.error, type: 'error', - message: 'Sorry, we are having some technical difficulties. Please try again.', + message: + 'Sorry, we are having some technical difficulties. Please try again.', }, { color: Color.success, @@ -37,8 +40,7 @@ const App = () => { { color: Color.purple, type: 'custom', - message: - `Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. + message: `Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.`, @@ -80,7 +82,8 @@ Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deseru const _showAlertQueue = () => { const types = ['info', 'warn', 'error', 'success', 'custom']; - const message = 'Officia eu do labore incididunt consequat sunt sint ullamco cillum.'; + const message = + 'Officia eu do labore incididunt consequat sunt sint ullamco cillum.'; let count = 1; types.map(type => { dropDownAlertRef.alertWithType( diff --git a/docs/PROPS.md b/docs/PROPS.md index fc9114fc..a049c8bf 100644 --- a/docs/PROPS.md +++ b/docs/PROPS.md @@ -63,7 +63,7 @@ | Name | Type | Description | Default | | ----------------------- | :----: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | | `defaultContainer` | Object | Style for inner view container (**override paddingTop with this**) | `{ flexDirection: 'row', padding: 8 }` | -| `defaultTextContainer` | Object | Style for inner text container (holds title and message) | `{ flex: 1, padding: 8 }` | +| `defaultTextContainer` | Object | Style for inner text container (holds title and message) | `{ flex: 1, padding: 8 }` | | `wrapperStyle` | Object | styles for the view that wraps the container. For [React Native Web](https://github.com/necolas/react-native-web) support you might want to set this to `{ position: 'fixed' }` | `null` | | `containerStyle` | Object | styles for container for custom type only | `{ flexDirection: 'row', backgroundColor: '#202020' }` | | `contentContainerStyle` | Object | styles for ContentView | `{ flex: 1, flexDirection: 'row' }` |