Skip to content

Commit 07edd3c

Browse files
committed
refactor: remove remaining MD3 mentions after MD2 removal
1 parent f9ac43b commit 07edd3c

78 files changed

Lines changed: 563 additions & 823 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/src/components/BannerExample.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import {
99
Avatar,
1010
Button,
1111
FAB,
12-
MD3DarkTheme as DarkTheme,
13-
MD3LightTheme as DefaultTheme,
12+
DarkTheme as DarkTheme,
13+
LightTheme as DefaultTheme,
1414
ProgressBar,
1515
PaperProvider,
1616
RadioButton,

docs/src/components/GetStartedButtons.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import Link from '@docusaurus/Link';
99
import { useColorMode } from '@docusaurus/theme-common';
1010
import {
1111
Button,
12-
MD3DarkTheme as DarkTheme,
13-
MD3LightTheme as DefaultTheme,
12+
DarkTheme as DarkTheme,
13+
LightTheme as DefaultTheme,
1414
PaperProvider,
1515
} from 'react-native-paper';
1616

example/src/DrawerItems.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
Button,
1010
Dialog,
1111
Drawer,
12-
MD3Colors,
12+
Colors,
1313
Switch,
1414
Text,
1515
TouchableRipple,
@@ -136,8 +136,8 @@ function DrawerItems() {
136136

137137
const coloredLabelTheme = {
138138
colors: {
139-
secondaryContainer: MD3Colors.tertiary80,
140-
onSecondaryContainer: MD3Colors.tertiary20,
139+
secondaryContainer: Colors.tertiary80,
140+
onSecondaryContainer: Colors.tertiary20,
141141
},
142142
};
143143

example/src/Examples/ActivityIndicatorExample.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import { StyleSheet, View } from 'react-native';
33

4-
import { ActivityIndicator, FAB, List, MD3Colors } from 'react-native-paper';
4+
import { ActivityIndicator, FAB, List, Colors } from 'react-native-paper';
55

66
import ScreenWrapper from '../ScreenWrapper';
77

@@ -41,7 +41,7 @@ const ActivityIndicatorExample = () => {
4141
<List.Section title="Custom color">
4242
<ActivityIndicator
4343
animating={animating}
44-
color={MD3Colors.error20}
44+
color={Colors.error20}
4545
hidesWhenStopped={false}
4646
/>
4747
</List.Section>

example/src/Examples/AnimatedFABExample/AnimatedFABExample.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { NativeScrollEvent, NativeSyntheticEvent } from 'react-native';
33
import { Animated, FlatList, Platform, StyleSheet, View } from 'react-native';
44

55
import Icon from '@expo/vector-icons/MaterialCommunityIcons';
6-
import { Avatar, MD3Colors, Text } from 'react-native-paper';
6+
import { Avatar, Colors, Text } from 'react-native-paper';
77

88
import CustomFAB from './CustomFAB';
99
import CustomFABControls, {
@@ -46,7 +46,7 @@ const AnimatedFABExample = () => {
4646
<Avatar.Text
4747
style={[styles.avatar, { backgroundColor: item.bgColor }]}
4848
label={item.initials}
49-
color={MD3Colors.primary100}
49+
color={Colors.primary100}
5050
size={40}
5151
/>
5252
<View style={styles.itemTextContentContainer}>
@@ -88,9 +88,7 @@ const AnimatedFABExample = () => {
8888

8989
<Icon
9090
name={item.favorite ? 'star' : 'star-outline'}
91-
color={
92-
item.favorite ? MD3Colors.error70 : MD3Colors.neutralVariant70
93-
}
91+
color={item.favorite ? Colors.error70 : Colors.neutralVariant70}
9492
size={20}
9593
onPress={() => setVisible(!visible)}
9694
style={styles.icon}

example/src/Examples/AvatarExample.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import { StyleSheet, View } from 'react-native';
33

4-
import { Avatar, List, MD3Colors } from 'react-native-paper';
4+
import { Avatar, List, Colors } from 'react-native-paper';
55

66
import ScreenWrapper from '../ScreenWrapper';
77

@@ -14,11 +14,11 @@ const AvatarExample = () => {
1414
style={[
1515
styles.avatar,
1616
{
17-
backgroundColor: MD3Colors.error70,
17+
backgroundColor: Colors.error70,
1818
},
1919
]}
2020
label="XD"
21-
color={MD3Colors.primary0}
21+
color={Colors.primary0}
2222
/>
2323
<Avatar.Text style={styles.avatar} label="XD" />
2424
<Avatar.Text style={styles.avatar} label="XD" size={80} />
@@ -30,11 +30,11 @@ const AvatarExample = () => {
3030
style={[
3131
styles.avatar,
3232
{
33-
backgroundColor: MD3Colors.error70,
33+
backgroundColor: Colors.error70,
3434
},
3535
]}
3636
icon="folder"
37-
color={MD3Colors.primary0}
37+
color={Colors.primary0}
3838
/>
3939
<Avatar.Icon style={styles.avatar} icon="folder" />
4040
<Avatar.Icon style={styles.avatar} icon="folder" size={80} />

example/src/Examples/BadgeExample.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
Badge,
66
IconButton,
77
List,
8-
MD3Colors,
8+
Colors,
99
Text,
1010
Switch,
1111
} from 'react-native-paper';
@@ -41,7 +41,7 @@ const BadgeExample = () => {
4141
style={[
4242
styles.badge,
4343
{
44-
backgroundColor: MD3Colors.primary80,
44+
backgroundColor: Colors.primary80,
4545
},
4646
]}
4747
>

example/src/Examples/BannerExample.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
View,
99
} from 'react-native';
1010

11-
import { Banner, FAB, MD3Colors } from 'react-native-paper';
11+
import { Banner, FAB, Colors } from 'react-native-paper';
1212

1313
import { useExampleTheme } from '../hooks/useExampleTheme';
1414
import ScreenWrapper from '../ScreenWrapper';
@@ -32,11 +32,11 @@ const BannerExample = () => {
3232
const customTheme = {
3333
...defaultTheme,
3434
colors: {
35-
onSurface: MD3Colors.tertiary100,
35+
onSurface: Colors.tertiary100,
3636
elevation: {
37-
level1: MD3Colors.tertiary50,
37+
level1: Colors.tertiary50,
3838
},
39-
primary: MD3Colors.tertiary10,
39+
primary: Colors.tertiary10,
4040
},
4141
};
4242

example/src/Examples/ButtonExample.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ const ButtonExample = () => {
275275
mode="outlined"
276276
onPress={() => {}}
277277
style={styles.button}
278-
labelStyle={[styles.fontStyles, styles.md3FontStyles]}
278+
labelStyle={[styles.fontStyles]}
279279
>
280280
Custom Font
281281
</Button>
@@ -367,10 +367,8 @@ const styles = StyleSheet.create({
367367
flexReverse: {
368368
flexDirection: 'row-reverse',
369369
},
370-
md3FontStyles: {
371-
lineHeight: 32,
372-
},
373370
fontStyles: {
371+
lineHeight: 32,
374372
fontWeight: '800',
375373
fontSize: 24,
376374
},

example/src/Examples/CheckboxExample.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import { StyleSheet, View } from 'react-native';
33

4-
import { Checkbox, MD3Colors, Text, TouchableRipple } from 'react-native-paper';
4+
import { Checkbox, Colors, Text, TouchableRipple } from 'react-native-paper';
55

66
import ScreenWrapper from '../ScreenWrapper';
77

@@ -28,7 +28,7 @@ const CheckboxExample = () => {
2828
<TextComponent>Custom</TextComponent>
2929
<View pointerEvents="none">
3030
<Checkbox
31-
color={MD3Colors.error70}
31+
color={Colors.error70}
3232
status={checkedCustom ? 'checked' : 'unchecked'}
3333
/>
3434
</View>

0 commit comments

Comments
 (0)