Skip to content

Commit

Permalink
Merge pull request #3 from alessiocancian/dev
Browse files Browse the repository at this point in the history
Added userInterfaceStyle prop
  • Loading branch information
alessiocancian authored Mar 7, 2021
2 parents 7210770 + 1e292a4 commit fb6e04d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,12 @@ https://github.com/alessiocancian/react-native-actionsheet/blob/master/lib/optio
<td>PropTypes.func</td>
<td>(index) => {}</td>
</tr>
<tr>
<td>userInterfaceStyle</td>
<td>iOS only, RN version >=0.63</td>
<td>"light" | "dark"</td>
<td>System theme</td>
</tr>
<tr>
<td>styles</td>
<td>only for ActionSheetCustom</td>
Expand Down
6 changes: 6 additions & 0 deletions lib/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ export default [
*/
'tintColor',

/**
* iOS only, change default theme
* @default system theme color
*/
'userInterfaceStyle',

/**
* The 'callback' function takes one parameter, the zero-based index of the selected item
* @type (buttonIndex) => void
Expand Down
5 changes: 5 additions & 0 deletions lib/ts/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ interface Props {
cancelButtonIndex?: number;
destructiveButtonIndex?: number;
styles?: object;
/**
* iOS only, change default theme
* @default system theme color
*/
userInterfaceStyle?: "light" | "dark"
}

export default class ActionSheet extends Component<Props> {
Expand Down

0 comments on commit fb6e04d

Please sign in to comment.