Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: move to react-native-masked-view namespace #85

Merged
merged 1 commit into from
Nov 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ _Note: React Native MaskedView is not currently supported by Expo unless you "ej
## Getting Started

```
$ yarn add @react-native-community/masked-view
$ yarn add @react-native-masked-view/masked-view
```

or

```
$ npm install --save @react-native-community/masked-view
$ npm install --save @react-native-masked-view/masked-view
```

#### Using React Native >= 0.60

Linking the package manually is not required anymore with [Autolinking](https://github.com/react-native-community/cli/blob/master/docs/autolinking.md).
Linking the package manually is not required anymore with [Autolinking](https://github.com/react-native-masked-view/cli/blob/master/docs/autolinking.md).

- **iOS Platform:**

Expand All @@ -39,17 +39,17 @@ Linking the package manually is not required anymore with [Autolinking](https://
You then need to link the native parts of the library for the platforms you are using. The easiest way to link the library is using the CLI tool by running this command from the root of your project:

```
$ react-native link @react-native-community/masked-view
$ react-native link @react-native-masked-view/masked-view
```

## Usage

Import the `MaskedView` component from `@react-native-community/masked-view` and use it like so:
Import the `MaskedView` component from `@react-native-masked-view/masked-view` and use it like so:

```jsx
import React from 'react';
import { Text, View } from 'react-native';
import MaskedView from '@react-native-community/masked-view';
import MaskedView from '@react-native-masked-view/masked-view';

export default class App extends React.Component {
render() {
Expand All @@ -63,14 +63,14 @@ export default class App extends React.Component {
backgroundColor: 'transparent',
flex: 1,
justifyContent: 'center',
alignItems: 'center'
alignItems: 'center',
}}
>
<Text
style={{
fontSize: 60,
color: 'black',
fontWeight: 'bold'
fontWeight: 'bold',
}}
>
Basic Mask
Expand Down Expand Up @@ -111,11 +111,11 @@ The following image demonstrates that you can put almost anything behind the mas

<!-- badges -->

[build-badge]: https://img.shields.io/circleci/project/github/react-native-community/react-native-masked-view/master.svg?style=flat-square
[build]: https://circleci.com/gh/react-native-community/react-native-masked-view
[version-badge]: https://img.shields.io/npm/v/@react-native-community/masked-view.svg?style=flat-square
[package]: https://www.npmjs.com/package/@react-native-community/masked-view
[license-badge]: https://img.shields.io/npm/l/@react-native-community/masked-view.svg?style=flat-square
[build-badge]: https://img.shields.io/circleci/project/github/react-native-masked-view/react-native-masked-view/master.svg?style=flat-square
[build]: https://circleci.com/gh/react-native-masked-view/react-native-masked-view
[version-badge]: https://img.shields.io/npm/v/@react-native-masked-view/masked-view.svg?style=flat-square
[package]: https://www.npmjs.com/package/@react-native-masked-view/masked-view
[license-badge]: https://img.shields.io/npm/l/@react-native-masked-view/masked-view.svg?style=flat-square
[license]: https://opensource.org/licenses/MIT
[lean-core-badge]: https://img.shields.io/badge/Lean%20Core-Extracted-brightgreen.svg?style=flat-square
[lean-core-issue]: https://github.com/facebook/react-native/issues/23313
2 changes: 1 addition & 1 deletion RNCMaskedView.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Pod::Spec.new do |s|
s.homepage = package['homepage']
s.platforms = { :ios => "9.0", :tvos => "9.0" }

s.source = { :git => "https://github.com/react-native-community/react-native-masked-view.git", :tag => "v#{s.version}" }
s.source = { :git => "https://github.com/react-native-masked-view/react-native-masked-view.git", :tag => "v#{s.version}" }
s.source_files = "ios/**/*.{h,m}"

s.dependency 'React-Core'
Expand Down
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@react-native-community/masked-view",
"name": "@react-native-masked-view/masked-view",
"description": "React Native MaskedView component",
"types": "./types/index.d.ts",
"main": "index.js",
"author": "Mike Nedosekin <crespo8800@gmail.com>",
"license": "MIT",
"version": "0.1.10",
"homepage": "https://github.com/react-native-community/react-native-masked-view#readme",
"homepage": "https://github.com/react-native-masked-view/react-native-masked-view#readme",
"keywords": [
"react-native",
"react native",
Expand Down Expand Up @@ -46,9 +46,12 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/react-native-community/react-native-masked-view.git"
"url": "git+https://github.com/react-native-masked-view/react-native-masked-view.git"
},
"bugs": {
"url": "https://github.com/react-native-community/react-native-masked-view/issues"
"url": "https://github.com/react-native-masked-view/react-native-masked-view/issues"
},
"publishConfig": {
"access": "public"
}
}
2 changes: 1 addition & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ interface MaskedViewProps extends ReactNative.ViewProps {
maskElement: React.ReactElement;
}
/**
* @see https://github.com/react-native-community/react-native-masked-view
* @see https://github.com/react-native-masked-view/react-native-masked-view
*/
declare class MaskedViewComponent extends React.Component<MaskedViewProps> {}
declare const MaskedViewBase: ReactNative.Constructor<
Expand Down