Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(FAB): add small size style (#3322)
- Loading branch information
0 parents
commit 0c37ac4
Showing
90 changed files
with
4,359 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
jest.mock( | ||
'../../../node_modules/react-native/Libraries/LayoutAnimation/LayoutAnimation.js' | ||
); | ||
jest.mock( | ||
'../../../node_modules/react-native/Libraries/Animated/NativeAnimatedHelper.js' | ||
); | ||
jest.useFakeTimers('legacy'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import React, { JSXElementConstructor } from 'react'; | ||
import { View } from 'react-native'; | ||
import { | ||
render, | ||
RenderOptions, | ||
fireEvent, | ||
act, | ||
} from '@testing-library/react-native'; | ||
import { ThemeProvider, FullTheme, colors } from '../src/config'; | ||
import deepmerge from 'deepmerge'; | ||
|
||
export { fireEvent, act }; | ||
|
||
// for getting findByType e.g. wrapper.findByType(Icon) see implementation in Avatar Component | ||
export const renderWithWrapper = ( | ||
children: React.ReactElement<any, string | JSXElementConstructor<any>>, | ||
wrapperTestID?: string, | ||
themeProp: Partial<FullTheme> = {}, | ||
renderOptions?: RenderOptions | ||
) => { | ||
const options: RenderOptions = { | ||
...(!wrapperTestID && { | ||
wrapper: (props) => <View {...props} testID="wrapper" />, | ||
}), | ||
...renderOptions, | ||
}; | ||
const renderApi = render( | ||
themeProp ? ( | ||
<ThemeProvider theme={deepmerge({ colors }, themeProp)}> | ||
{children} | ||
</ThemeProvider> | ||
) : ( | ||
children | ||
), | ||
options | ||
); | ||
const wrapper = renderApi.queryByTestId(wrapperTestID || 'wrapper'); | ||
return { wrapper, ...renderApi }; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
node_modules | ||
.DS_Store | ||
*.log | ||
site | ||
coverage | ||
jsconfig.json | ||
.vscode/ | ||
.idea/ | ||
package-lock.json | ||
build | ||
*.orig | ||
.docgen/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,195 @@ | ||
<p align="center"> | ||
<a href="https://reactnativeelements.com/"> | ||
<img alt="react-native-elements" src="https://user-images.githubusercontent.com/5962998/65694309-a825f000-e043-11e9-8382-db0dba0851e3.png" width="300"> | ||
</a> | ||
</p> | ||
|
||
<p align="center"> | ||
Cross Platform <a href="https://reactnative.dev">React Native</a> UI Toolkit | ||
</p> | ||
|
||
<p align="center"> | ||
<a href="https://www.npmjs.com/package/react-native-elements"><img src="https://img.shields.io/npm/v/@react-native-elements/themed.svg"></a> | ||
<a href="https://travis-ci.org/react-native-elements/react-native-elements"><img src="https://img.shields.io/travis/react-native-elements/react-native-elements/master.svg"></a> | ||
<a href="https://github.com/react-native-elements/react-native-elements"><img src="https://img.shields.io/github/stars/react-native-elements/react-native-elements"></a> | ||
<a href="https://www.npmjs.com/package/react-native-elements"><img src="https://img.shields.io/npm/dm/react-native-elements.svg"></a> | ||
<a href="https://react-native-elements-slack.herokuapp.com"><img src="https://react-native-elements-slack.herokuapp.com/badge.svg"></a> | ||
</p> | ||
|
||
<p align="center"> | ||
<a href="#backers"><img src="https://opencollective.com/react-native-elements/backers/badge.svg"></a> | ||
<a href="#sponsors"><img src="https://opencollective.com/react-native-elements/sponsors/badge.svg"></a> | ||
<a href="https://codecov.io/gh/react-native-elements/react-native-elements"><img src="https://codecov.io/gh/react-native-elements/react-native-elements/coverage.svg"></a> | ||
<a href="https://github.com/prettier/prettier"><img src="https://img.shields.io/badge/styled_with-prettier-ff69b4.svg"></a> | ||
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-blue.svg"></a> | ||
|
||
</p> | ||
|
||
<br /> | ||
|
||
![React Native Elements UI Toolkit](https://user-images.githubusercontent.com/5962998/37248832-a7060286-24b1-11e8-94a8-847ab6ded4ec.png) | ||
|
||
## Get Started | ||
|
||
### Installation | ||
|
||
Follow | ||
[these instructions](https://reactnativeelements.com/docs/) | ||
to install React Native Elements! | ||
|
||
### Usage | ||
|
||
Start using the components or try it on Snack | ||
[here](https://snack.expo.io/rJu6gJfBZ). | ||
|
||
```js | ||
import { Button } from 'react-native-elements'; | ||
|
||
<Button />; | ||
``` | ||
|
||
## Components included: | ||
|
||
- [x] [Avatar](https://reactnativeelements.com/docs/avatar) | ||
- [x] [Badge](https://reactnativeelements.com/docs/badge) | ||
- [x] [BottomSheet](https://reactnativeelements.com/docs/bottomsheet) | ||
- [x] [Button](https://reactnativeelements.com/docs/button) | ||
- [x] [ButtonGroup](https://reactnativeelements.com/docs/button_group) | ||
- [x] [Card](https://reactnativeelements.com/docs/card) | ||
- [x] [CheckBox](https://reactnativeelements.com/docs/checkbox) | ||
- [x] [Divider](https://reactnativeelements.com/docs/divider) | ||
- [x] [FAB](https://reactnativeelements.com/docs/fab) | ||
- [x] [Header](https://reactnativeelements.com/docs/header) | ||
- [x] [HTML style headings](https://reactnativeelements.com/docs/text) | ||
- [x] [Icon](https://reactnativeelements.com/docs/icon) | ||
- [x] [Image](https://reactnativeelements.com/docs/image) | ||
- [x] [Input](https://reactnativeelements.com/docs/input) | ||
- [x] [ListItem](https://reactnativeelements.com/docs/listitem) | ||
- [x] [Linear Progress](https://reactnativeelements.com/docs/linearProgress) | ||
- [x] [Overlay](https://reactnativeelements.com/docs/overlay) | ||
- [x] [Pricing](https://reactnativeelements.com/docs/pricing) | ||
- [x] [Rating](https://reactnativeelements.com/docs/rating) | ||
- [x] [SearchBar](https://reactnativeelements.com/docs/searchbar) | ||
- [x] [Slider](https://reactnativeelements.com/docs/slider) | ||
- [x] [Social Icons / Social Icon Buttons](https://reactnativeelements.com/docs/social_icon) | ||
- [x] [Speed Dial](https://reactnativeelements.com/docs/speeddial) | ||
- [x] [Switch](https://reactnativeelements.com/docs/switch) | ||
- [x] [Tile](https://reactnativeelements.com/docs/tile) | ||
- [x] [Tab](https://reactnativeelements.com/docs/tab) | ||
- [x] [TabView](https://reactnativeelements.com/docs/tab#tabview) | ||
- [x] [Tooltip](https://reactnativeelements.com/docs/tooltip) | ||
|
||
## React Native Web support | ||
|
||
As a cross platform UI Toolkit, you can now use RNE on the web & share your codebase between your React Native + React web apps. RNE components are rendered perfectly on browser. You can achieve this to target iOS, Android and Web by collaborating RNE and [React Native for Web](https://github.com/necolas/react-native-web). | ||
|
||
Click [here](https://reactnativeelements.com/blog/2018/12/13/react-native-web) for a full walkthrough using React Native Elements + React Native Web. | ||
|
||
## Demo App | ||
|
||
Checkout the official | ||
[React Native Elements App](https://expo.io/@flyingcircle/projects/react-native-elements-app) | ||
on Expo which uses all of the React Native Elements components. | ||
|
||
If you are looking to contribute to the React Native Elements App, click | ||
[here](https://github.com/react-native-elements/react-native-elements/tree/next/example) to | ||
view the implementation & run the RNE expo app locally. | ||
|
||
## Documentation | ||
|
||
[View the full docs here](https://reactnativeelements.com/docs/overview) | ||
|
||
## Contributing | ||
|
||
Interested in contributing to this repo? Check out our | ||
[Contributing Guide](https://reactnativeelements.com/docs/contributing) | ||
and submit a PR for a new feature/bug fix. | ||
|
||
A big shoutout to all our contributors! You could be here too! | ||
|
||
<a href="https://github.com/react-native-elements/react-native-elements/graphs/contributors"><img src="https://opencollective.com/react-native-elements/contributors.svg?width=890&button=false" /></a> | ||
|
||
### First Contributors | ||
|
||
We encourage everyone to contribute & submit PR's especially first-time | ||
contributors. Look for the label `Good First Issue` on the issues. Click | ||
[here](https://github.com/react-native-elements/react-native-elements/labels/%F0%9F%91%B6%20Good%20First%20Issue) | ||
to see them. | ||
|
||
If there is something you's like to see or request a new feature, please submit | ||
an | ||
[issue](https://github.com/react-native-elements/react-native-elements/issues/new) | ||
or a | ||
[pull request](https://github.com/react-native-elements/react-native-elements/pulls). | ||
|
||
### Core Contributors | ||
|
||
We are currently looking for new core contributors that can help lead this project. | ||
|
||
[Learn more here](https://github.com/react-native-elements/react-native-elements/issues/2222) | ||
|
||
### Slack Community | ||
|
||
In case you have any other question or would like to come say **Hi!** to the RNE | ||
community, join our [Slack team](https://react-native-elements-slack.herokuapp.com). | ||
See you on the other side! 👋😃 | ||
|
||
## Backers | ||
|
||
[Become a backer](https://opencollective.com/react-native-elements#backer) and show your support for React Native Elements. | ||
|
||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/backer/0/avatar)](https://opencollective.com/react-native-elements/backer/0/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/backer/1/avatar)](https://opencollective.com/react-native-elements/backer/1/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/backer/2/avatar)](https://opencollective.com/react-native-elements/backer/2/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/backer/3/avatar)](https://opencollective.com/react-native-elements/backer/3/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/backer/4/avatar)](https://opencollective.com/react-native-elements/backer/4/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/backer/5/avatar)](https://opencollective.com/react-native-elements/backer/5/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/backer/6/avatar)](https://opencollective.com/react-native-elements/backer/6/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/backer/7/avatar)](https://opencollective.com/react-native-elements/backer/7/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/backer/8/avatar)](https://opencollective.com/react-native-elements/backer/8/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/backer/9/avatar)](https://opencollective.com/react-native-elements/backer/9/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/backer/10/avatar)](https://opencollective.com/react-native-elements/backer/10/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/backer/11/avatar)](https://opencollective.com/react-native-elements/backer/11/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/backer/12/avatar)](https://opencollective.com/react-native-elements/backer/12/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/backer/13/avatar)](https://opencollective.com/react-native-elements/backer/13/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/backer/14/avatar)](https://opencollective.com/react-native-elements/backer/14/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/backer/15/avatar)](https://opencollective.com/react-native-elements/backer/15/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/backer/16/avatar)](https://opencollective.com/react-native-elements/backer/16/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/backer/17/avatar)](https://opencollective.com/react-native-elements/backer/17/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/backer/18/avatar)](https://opencollective.com/react-native-elements/backer/18/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/backer/19/avatar)](https://opencollective.com/react-native-elements/backer/19/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/backer/20/avatar)](https://opencollective.com/react-native-elements/backer/20/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/backer/21/avatar)](https://opencollective.com/react-native-elements/backer/21/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/backer/22/avatar)](https://opencollective.com/react-native-elements/backer/22/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/backer/23/avatar)](https://opencollective.com/react-native-elements/backer/23/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/backer/24/avatar)](https://opencollective.com/react-native-elements/backer/24/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/backer/25/avatar)](https://opencollective.com/react-native-elements/backer/25/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/backer/26/avatar)](https://opencollective.com/react-native-elements/backer/26/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/backer/27/avatar)](https://opencollective.com/react-native-elements/backer/27/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/backer/28/avatar)](https://opencollective.com/react-native-elements/backer/28/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/backer/29/avatar)](https://opencollective.com/react-native-elements/backer/29/website) | ||
|
||
## Sponsors | ||
|
||
Do you use React Native Elements in production? If so, consider supporting this project as it will allow the maintainers to dedicate more time to maintaining this project and also building new features for everyone. Also, your app or company's logo will show [on GitHub](https://github.com/react-native-elements/react-native-elements#sponsors) and link to your website - who doesn't want a little extra exposure? [Here's the info](https://opencollective.com/react-native-elements#sponsor). | ||
|
||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/sponsor/0/avatar)](https://opencollective.com/react-native-elements/sponsor/0/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/sponsor/1/avatar)](https://opencollective.com/react-native-elements/sponsor/1/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/sponsor/2/avatar)](https://opencollective.com/react-native-elements/sponsor/2/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/sponsor/3/avatar)](https://opencollective.com/react-native-elements/sponsor/3/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/sponsor/4/avatar)](https://opencollective.com/react-native-elements/sponsor/4/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/sponsor/5/avatar)](https://opencollective.com/react-native-elements/sponsor/5/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/sponsor/6/avatar)](https://opencollective.com/react-native-elements/sponsor/6/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/sponsor/7/avatar)](https://opencollective.com/react-native-elements/sponsor/7/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/sponsor/8/avatar)](https://opencollective.com/react-native-elements/sponsor/8/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/sponsor/9/avatar)](https://opencollective.com/react-native-elements/sponsor/9/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/sponsor/10/avatar)](https://opencollective.com/react-native-elements/sponsor/10/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/sponsor/11/avatar)](https://opencollective.com/react-native-elements/sponsor/11/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/sponsor/12/avatar)](https://opencollective.com/react-native-elements/sponsor/12/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/sponsor/13/avatar)](https://opencollective.com/react-native-elements/sponsor/13/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/sponsor/14/avatar)](https://opencollective.com/react-native-elements/sponsor/14/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/sponsor/15/avatar)](https://opencollective.com/react-native-elements/sponsor/15/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/sponsor/16/avatar)](https://opencollective.com/react-native-elements/sponsor/16/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/sponsor/17/avatar)](https://opencollective.com/react-native-elements/sponsor/17/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/sponsor/18/avatar)](https://opencollective.com/react-native-elements/sponsor/18/website) | ||
[![React Native Elements Backer](https://opencollective.com/react-native-elements/sponsor/19/avatar)](https://opencollective.com/react-native-elements/sponsor/19/website) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
presets: ['module:metro-react-native-babel-preset'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
{ | ||
"name": "@react-native-elements/themed", | ||
"version": "4.0.0-beta.0", | ||
"description": "React Native Elements & UI Toolkit", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"react-native": "src/index.ts", | ||
"source": "src/index.ts", | ||
"prepublish": "tsc --composite false", | ||
"files": [ | ||
"dist" | ||
], | ||
"keywords": [ | ||
"react-native", | ||
"reactjs", | ||
"reactnative", | ||
"bootstrap" | ||
], | ||
"scripts": { | ||
"build": "tsc --composite false", | ||
"test": "jest", | ||
"test:update": "jest -u", | ||
"test:ci": "jest --runInBand", | ||
"test:watch": "jest --watch", | ||
"postinstall": "opencollective-postinstall || exit 0", | ||
"lint": "eslint . --ext .js,.jsx,.ts,.tsx", | ||
"clean-install": "rimraf node_modules && yarn" | ||
}, | ||
"author": "Nader Dabit & Monte Thakkar", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/react-native-elements/react-native-elements/issues" | ||
}, | ||
"homepage": "https://reactnativeelements.com/", | ||
"collective": { | ||
"type": "opencollective", | ||
"url": "https://opencollective.com/react-native-elements", | ||
"logo": "https://opencollective.com/react-native-elements/logo.txt" | ||
}, | ||
"dependencies": { | ||
"@react-native-elements/base": "^4.0.0-beta.0" | ||
}, | ||
"devDependencies": { | ||
"@react-native-community/eslint-config": "^2.0.0", | ||
"@types/color": "^3.0.1", | ||
"@types/hoist-non-react-statics": "^3.3.1", | ||
"@types/lodash.isequal": "^4.5.5", | ||
"@types/react-test-renderer": "^17.0.0", | ||
"babel-jest": "^26.3.0", | ||
"metro-react-native-babel-preset": "^0.63.0", | ||
"react-test-renderer": "^16.13.1", | ||
"utility-types": "^3.10.0" | ||
}, | ||
"jest": { | ||
"displayName": "@react-native-elements/themed", | ||
"preset": "react-native", | ||
"testPathIgnorePatterns": [ | ||
"<rootDir>/node_modules", | ||
"<rootDir>/dist" | ||
], | ||
"moduleNameMapper": { | ||
"@react-native-elements/base/dist/([^/]+)": "<rootDir>/../base/src/$1", | ||
"@react-native-elements/([^/]+)": "<rootDir>/../$1/src" | ||
}, | ||
"transformIgnorePatterns": [ | ||
"<rootDir>/../../node_modules/(?!(@react-native|react-native|@react-native-elements/base)/)" | ||
], | ||
"coveragePathIgnorePatterns": [], | ||
"setupFilesAfterEnv": [ | ||
"<rootDir>/.ci/setupTests.ts" | ||
], | ||
"collectCoverage": true, | ||
"globals": { | ||
"__DEV__": true | ||
}, | ||
"transform": { | ||
".+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$": "jest-transform-stub" | ||
}, | ||
"collectCoverageFrom": [ | ||
"src/**/*.{js,jsx,ts,tsx}", | ||
"!src/index.tsx", | ||
"!src/helpers/*.tsx" | ||
], | ||
"coverageThreshold": { | ||
"global": { | ||
"lines": 90, | ||
"statements": 90 | ||
} | ||
} | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/react-native-elements/react-native-elements.git" | ||
} | ||
} |
Oops, something went wrong.