Skip to content

Commit

Permalink
🛠 Refactor: Example - Rename to CardButton
Browse files Browse the repository at this point in the history
Summary: Rename from `Button` to `CardButton`.
  • Loading branch information
dominicstop committed Aug 25, 2022
1 parent f24d6c6 commit a2d16a0
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { StyleSheet, Text, TouchableOpacity, TouchableOpacityProps } from 'react
import * as Colors from '../constants/Colors';


export function Button(props: TouchableOpacityProps & {
export function CardButton(props: TouchableOpacityProps & {
buttonText?: string;
}){
return(
Expand Down
4 changes: 2 additions & 2 deletions example/src/examples/PopoverViewExample01.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { StyleSheet, View, Text } from 'react-native';

import { PopoverView } from 'react-native-ios-popover';

import { Button } from '../components/Button';
import { CardButton } from '../components/CardButton';
import { ExampleItemCard } from '../components/ExampleItemCard';

import type { SharedExampleProps } from './SharedExampleTypes';
Expand Down Expand Up @@ -33,7 +33,7 @@ export default function PopoverViewExample01(props: SharedExampleProps) {
</View>
)}
>
<Button onPress={() => {
<CardButton onPress={() => {
popoverRef.current?.setVisibility(true);
}}/>
</PopoverView>
Expand Down
4 changes: 2 additions & 2 deletions example/src/examples/PopoverViewExample02.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { StyleSheet, View, Text } from 'react-native';

import { PopoverArrowDirections, PopoverView } from 'react-native-ios-popover';

import { Button } from '../components/Button';
import { CardButton } from '../components/CardButton';
import { ExampleItemCard } from '../components/ExampleItemCard';

import type { SharedExampleProps } from './SharedExampleTypes';
Expand Down Expand Up @@ -48,7 +48,7 @@ export default function PopoverViewExample02(props: SharedExampleProps) {
</View>
)}
>
<Button onPress={() => {
<CardButton onPress={() => {
popoverRef.current?.setVisibility(true);
}}/>
</PopoverView>
Expand Down
4 changes: 2 additions & 2 deletions example/src/examples/PopoverViewExample03.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { StyleSheet, View, Text } from 'react-native';

import { PopoverView } from 'react-native-ios-popover';

import { Button } from '../components/Button';
import { CardButton } from '../components/CardButton';
import { ExampleItemCard } from '../components/ExampleItemCard';

import type { SharedExampleProps } from './SharedExampleTypes';
Expand Down Expand Up @@ -36,7 +36,7 @@ export default function PopoverViewExample03(props: SharedExampleProps) {
</View>
)}
>
<Button onPress={() => {
<CardButton onPress={() => {
popoverRef.current?.setVisibility(true);
}}/>
</PopoverView>
Expand Down
4 changes: 2 additions & 2 deletions example/src/examples/PopoverViewExample04.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useRef } from 'react';
import { StyleSheet, View, Text } from 'react-native';

import { PopoverView } from 'react-native-ios-popover';
import { Button } from './../components/Button';
import { CardButton } from '../components/CardButton';
import { ExampleItemCard } from '../components/ExampleItemCard';

import type { SharedExampleProps } from './SharedExampleTypes';
Expand Down Expand Up @@ -33,7 +33,7 @@ export default function PopoverViewExample04(props: SharedExampleProps) {
</View>
)}
>
<Button onPress={() => {
<CardButton onPress={() => {
popoverRef.current?.setVisibility(true);
}}/>
</PopoverView>
Expand Down
4 changes: 2 additions & 2 deletions example/src/examples/PopoverViewExample05.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { StyleSheet, View, Text, TouchableOpacity, Alert } from 'react-native';

import { PopoverView } from 'react-native-ios-popover';

import { Button } from './../components/Button';
import { CardButton } from '../components/CardButton';
import { ExampleItemCard } from '../components/ExampleItemCard';

import type { SharedExampleProps } from './SharedExampleTypes';
Expand Down Expand Up @@ -46,7 +46,7 @@ export default function PopoverViewExample05(props: SharedExampleProps) {
</View>
)}
>
<Button
<CardButton
buttonText={'⭐️ Toggle Popover'}
onPress={() => {
popoverRef.current?.toggleVisibility()
Expand Down
4 changes: 2 additions & 2 deletions example/src/examples/PopoverViewExample06.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { StyleSheet, View, Text, Alert } from 'react-native';

import { PopoverView } from 'react-native-ios-popover';

import { Button } from './../components/Button';
import { CardButton } from '../components/CardButton';
import { ExampleItemCard } from '../components/ExampleItemCard';

import type { SharedExampleProps } from './SharedExampleTypes';
Expand Down Expand Up @@ -34,7 +34,7 @@ export default function PopoverViewExample06(props: SharedExampleProps) {
</View>
)}
>
<Button onPress={() => {
<CardButton onPress={() => {
popoverRef.current?.setVisibility(true);
}}/>
</PopoverView>
Expand Down
4 changes: 2 additions & 2 deletions example/src/examples/PopoverViewExample07.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { StyleSheet, View, Text, Switch, Alert } from 'react-native';

import { PopoverView } from 'react-native-ios-popover';

import { Button } from './../components/Button';
import { CardButton } from '../components/CardButton';
import { ExampleItemCard } from '../components/ExampleItemCard';

import type { SharedExampleProps } from './SharedExampleTypes';
Expand Down Expand Up @@ -42,7 +42,7 @@ export default function PopoverViewExample07(props: SharedExampleProps) {
</View>
)}
>
<Button onPress={() => {
<CardButton onPress={() => {
popoverRef.current?.setVisibility(true);
}}/>
</PopoverView>
Expand Down
4 changes: 2 additions & 2 deletions example/src/examples/PopoverViewExample08.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { StyleSheet, View, Text } from 'react-native';

import { PopoverView } from 'react-native-ios-popover';

import { Button } from './../components/Button';
import { CardButton } from '../components/CardButton';
import { ExampleItemCard } from '../components/ExampleItemCard';

import type { SharedExampleProps } from './SharedExampleTypes';
Expand Down Expand Up @@ -33,7 +33,7 @@ export default function PopoverViewExample08(props: SharedExampleProps) {
</View>
)}
>
<Button
<CardButton
buttonText={'⭐️ Toggle Popover'}
onPress={() => {
popoverRef.current?.toggleVisibility();
Expand Down

0 comments on commit a2d16a0

Please sign in to comment.