Skip to content

Commit b1be43a

Browse files
ci(github): migrate from CircleCI to GitHub Actions PE-37036
1 parent 119c152 commit b1be43a

File tree

4 files changed

+74
-84
lines changed

4 files changed

+74
-84
lines changed

.circleci/config.yml

-49
This file was deleted.

.github/workflows/build.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: build
2+
on: [push, pull_request]
3+
4+
jobs:
5+
build:
6+
runs-on: ubuntu-latest
7+
8+
steps:
9+
- name: Checkout repository
10+
uses: actions/checkout@v4
11+
12+
- name: Use Node.js
13+
uses: actions/setup-node@v4
14+
with:
15+
cache: yarn
16+
node-version-file: .nvmrc
17+
18+
- name: Install dependencies
19+
run: yarn
20+
21+
- name: Run ESLint
22+
run: yarn lint
23+
24+
- name: Setup Code Climate
25+
uses: remarkablemark/setup-codeclimate@v2
26+
27+
- name: Run Tests and Upload Coverage
28+
run: |
29+
cc-test-reporter before-build
30+
yarn test:coverage
31+
cc-test-reporter after-build --exit-code $?
32+
env:
33+
CC_TEST_REPORTER_ID: 9b36beb22e04451e6414fcc28926f995c253d94877f616b50d192255196fbb68
34+
35+
- name: Codecov
36+
uses: codecov/codecov-action@v4
37+
env:
38+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20

README.md

+35-35
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![npm version](https://badge.fury.io/js/react-native-picker-select.svg)](https://badge.fury.io/js/react-native-picker-select)
44
[![npm downloads](https://img.shields.io/npm/dm/react-native-picker-select.svg?style=flat-square)](https://www.npmjs.com/package/react-native-picker-select)
55
[![Test Coverage](https://api.codeclimate.com/v1/badges/095f5b1ee137705ed382/test_coverage)](https://codeclimate.com/github/lawnstarter/react-native-picker-select/test_coverage)
6-
[![CircleCI](https://circleci.com/gh/lawnstarter/react-native-picker-select.svg?style=svg)](https://circleci.com/gh/lawnstarter/react-native-picker-select)
6+
[![build](https://github.com/lawnstarter/react-native-picker-select/actions/workflows/build.yml/badge.svg)](https://github.com/lawnstarter/react-native-picker-select/actions/workflows/build.yml)
77

88
A Picker component for React Native which emulates the native `<select>` interfaces for iOS and Android
99

@@ -23,7 +23,7 @@ For either platform, you can alternatively pass down a child element of your cho
2323

2424
This package is built around and depends on [@react-native-picker/picker](https://github.com/react-native-picker/picker). Please make sure you install it correctly (as seen below in installation steps).
2525

26-
```
26+
```sh
2727
npm install react-native-picker-select
2828

2929
# React Native users
@@ -40,16 +40,16 @@ expo install @react-native-picker/picker
4040
import RNPickerSelect from 'react-native-picker-select';
4141

4242
export const Dropdown = () => {
43-
return (
44-
<RNPickerSelect
45-
onValueChange={(value) => console.log(value)}
46-
items={[
47-
{ label: 'Football', value: 'football' },
48-
{ label: 'Baseball', value: 'baseball' },
49-
{ label: 'Hockey', value: 'hockey' },
50-
]}
51-
/>
52-
);
43+
return (
44+
<RNPickerSelect
45+
onValueChange={(value) => console.log(value)}
46+
items={[
47+
{ label: 'Football', value: 'football' },
48+
{ label: 'Baseball', value: 'baseball' },
49+
{ label: 'Hockey', value: 'hockey' },
50+
]}
51+
/>
52+
);
5353
};
5454
```
5555

@@ -94,26 +94,26 @@ All properties mentioned below must be nested under the `style` prop. Examples o
9494

9595
#### iOS-specific
9696

97-
- The component wraps a TextInput without styling. You can target the TextInput styling with `inputIOS`.
98-
- Other styles that can be modified for iOS are named `inputIOSContainer`, `placeholder`, `viewContainer`, `chevronContainer`, `chevron`, `chevronUp`, `chevronDown`, `chevronActive`, `done`, `modalViewTop`, `modalViewMiddle`, and `modalViewBottom`
97+
- The component wraps a TextInput without styling. You can target the TextInput styling with `inputIOS`.
98+
- Other styles that can be modified for iOS are named `inputIOSContainer`, `placeholder`, `viewContainer`, `chevronContainer`, `chevron`, `chevronUp`, `chevronDown`, `chevronActive`, `done`, `modalViewTop`, `modalViewMiddle`, and `modalViewBottom`
9999

100100
#### Android-specific
101101

102-
- The native Picker in its inactive state acts looks similar to a TextInput, but it has limitations on custom styling. Any styling that is possible can be applied via `inputAndroid`.
103-
- You can add some styling customization to the active-state native Picker, [but that requires modifying some xml files](https://stackoverflow.com/a/39141949/1437023)
104-
- If you set the prop `useNativeAndroidPickerStyle` to false, the component will allow a few other style objects: `inputAndroidContainer`, `placeholder`, and `inputAndroid`
105-
- Other styles that can be modified for Android are named `headlessAndroidContainer` and `viewContainer`
102+
- The native Picker in its inactive state acts looks similar to a TextInput, but it has limitations on custom styling. Any styling that is possible can be applied via `inputAndroid`.
103+
- You can add some styling customization to the active-state native Picker, [but that requires modifying some xml files](https://stackoverflow.com/a/39141949/1437023)
104+
- If you set the prop `useNativeAndroidPickerStyle` to false, the component will allow a few other style objects: `inputAndroidContainer`, `placeholder`, and `inputAndroid`
105+
- Other styles that can be modified for Android are named `headlessAndroidContainer` and `viewContainer`
106106

107107
#### Web-specific
108108

109-
- The component creates a select tag
110-
- The styling of this select tag can be modified using a nested object with the key `inputWeb`
109+
- The component creates a select tag
110+
- The styling of this select tag can be modified using a nested object with the key `inputWeb`
111111

112112
### Icon
113113

114-
- If a component is passed in via the `Icon` prop - it will be rendered with `{ position: 'absolute', right: 0 }` applied to its wrapping container. You can modify these values and add additional spacing to position the icon as needed by modifying `iconContainer`. You'll probably also want to add some `paddingRight` to your input styling to avoid any longer text appearing behind the icon.
115-
- You can pass a component of your choosing (css, image, svg, etc..) for use as the icon. For ease of use, consider a library such as [react-native-shapes](https://github.com/lfkwtz/react-native-shapes) or [react-native-vector-icons](https://github.com/oblador/react-native-vector-icons).
116-
- Examples of different icons and their usage can be found [on the example snack](https://snack.expo.io/@lfkwtz/react-native-picker-select).
114+
- If a component is passed in via the `Icon` prop - it will be rendered with `{ position: 'absolute', right: 0 }` applied to its wrapping container. You can modify these values and add additional spacing to position the icon as needed by modifying `iconContainer`. You'll probably also want to add some `paddingRight` to your input styling to avoid any longer text appearing behind the icon.
115+
- You can pass a component of your choosing (css, image, svg, etc..) for use as the icon. For ease of use, consider a library such as [react-native-shapes](https://github.com/lfkwtz/react-native-shapes) or [react-native-vector-icons](https://github.com/oblador/react-native-vector-icons).
116+
- Examples of different icons and their usage can be found [on the example snack](https://snack.expo.io/@lfkwtz/react-native-picker-select).
117117

118118
## Accessibility
119119

@@ -128,21 +128,21 @@ In the example below, we render the picker with supplementary description text,
128128

129129
```js
130130
const selectedItem = {
131-
title: 'Selected item title',
132-
description: 'Secondary long descriptive text ...',
131+
title: 'Selected item title',
132+
description: 'Secondary long descriptive text ...',
133133
};
134134

135135
export const Dropdown = () => {
136-
return (
137-
<RNPickerSelect
138-
pickerProps={{
139-
accessibilityLabel: selectedItem.title,
140-
}}
141-
>
142-
<Text>{selectedItem.title}</Text>
143-
<Text>{selectedItem.description}</Text>
144-
</RNPickerSelect>
145-
);
136+
return (
137+
<RNPickerSelect
138+
pickerProps={{
139+
accessibilityLabel: selectedItem.title,
140+
}}
141+
>
142+
<Text>{selectedItem.title}</Text>
143+
<Text>{selectedItem.description}</Text>
144+
</RNPickerSelect>
145+
);
146146
};
147147
```
148148

0 commit comments

Comments
 (0)