Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions example/src/index.native.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,11 @@ export default function PaperExample() {
}

return isDarkMode
? { ...MD3DarkTheme, colors: mdTheme.dark }
: { ...MD3LightTheme, colors: mdTheme.light };
? { ...MD3DarkTheme, colors: { ...MD3DarkTheme.colors, ...mdTheme.dark } }
: {
...MD3LightTheme,
colors: { ...MD3LightTheme.colors, ...mdTheme.light },
};
}, [isDarkMode, mdTheme, shouldUseDeviceColors]);

React.useEffect(() => {
Expand Down
28 changes: 14 additions & 14 deletions example/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1162,71 +1162,71 @@ export const colorThemes = {
pink: {
light: {
...MD3LightTheme,
...lightPinkColors,
colors: { ...MD3LightTheme.colors, ...lightPinkColors.colors },
},
dark: {
...MD3DarkTheme,
...darkPinkColors,
colors: { ...MD3DarkTheme.colors, ...darkPinkColors.colors },
},
},
green: {
light: {
...MD3LightTheme,
...lightGreenColors,
colors: { ...MD3LightTheme.colors, ...lightGreenColors.colors },
},
dark: {
...MD3DarkTheme,
...darkGreenColors,
colors: { ...MD3DarkTheme.colors, ...darkGreenColors.colors },
},
},
blue: {
light: {
...MD3LightTheme,
...lightBlueColors,
colors: { ...MD3LightTheme.colors, ...lightBlueColors.colors },
},
dark: {
...MD3DarkTheme,
...darkBlueColors,
colors: { ...MD3DarkTheme.colors, ...darkBlueColors.colors },
},
},
orange: {
light: {
...MD3LightTheme,
...lightOrangeColors,
colors: { ...MD3LightTheme.colors, ...lightOrangeColors.colors },
},
dark: {
...MD3DarkTheme,
...darkOrangeColors,
colors: { ...MD3DarkTheme.colors, ...darkOrangeColors.colors },
},
},
red: {
light: {
...MD3LightTheme,
...lightRedColors,
colors: { ...MD3LightTheme.colors, ...lightRedColors.colors },
},
dark: {
...MD3DarkTheme,
...darkRedColors,
colors: { ...MD3DarkTheme.colors, ...darkRedColors.colors },
},
},
yellow: {
light: {
...MD3LightTheme,
...lightYellowColors,
colors: { ...MD3LightTheme.colors, ...lightYellowColors.colors },
},
dark: {
...MD3DarkTheme,
...darkYellowColors,
colors: { ...MD3DarkTheme.colors, ...darkYellowColors.colors },
},
},
cyan: {
light: {
...MD3LightTheme,
...lightCyanColors,
colors: { ...MD3LightTheme.colors, ...lightCyanColors.colors },
},
dark: {
...MD3DarkTheme,
...darkCyanColors,
colors: { ...MD3DarkTheme.colors, ...darkCyanColors.colors },
},
},
} as { [key: string]: { light: MD3Theme; dark: MD3Theme } };
Expand Down
4 changes: 2 additions & 2 deletions src/components/__tests__/Appbar/Appbar.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -303,13 +303,13 @@ describe('getAppbarColors', () => {

it('should return v3 light color if theme version is 3', () => {
expect(getAppbarBackgroundColor(getTheme(), elevation)).toBe(
tokens.md.ref.palette.neutral99
tokens.md.ref.palette.neutral98
);
});

it('should return v3 dark color if theme version is 3', () => {
expect(getAppbarBackgroundColor(getTheme(true), elevation)).toBe(
tokens.md.ref.palette.neutral10
tokens.md.ref.palette.neutral6
);
});
});
Expand Down
20 changes: 10 additions & 10 deletions src/components/__tests__/Appbar/__snapshots__/Appbar.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`Appbar does not pass any additional props to Searchbar 1`] = `
collapsable={false}
style={
{
"backgroundColor": "rgba(255, 251, 254, 1)",
"backgroundColor": "rgba(254, 247, 255, 1)",
"height": 64,
"shadowColor": "#000",
"shadowOffset": {
Expand All @@ -23,7 +23,7 @@ exports[`Appbar does not pass any additional props to Searchbar 1`] = `
style={
{
"alignItems": "center",
"backgroundColor": "rgba(255, 251, 254, 1)",
"backgroundColor": "rgba(254, 247, 255, 1)",
"flex": 1,
"flexDirection": "row",
"paddingBottom": undefined,
Expand All @@ -46,7 +46,7 @@ exports[`Appbar does not pass any additional props to Searchbar 1`] = `
collapsable={false}
style={
{
"backgroundColor": "rgb(238, 232, 244)",
"backgroundColor": "rgba(243, 237, 247, 1)",
"borderRadius": 28,
"shadowColor": "#000",
"shadowOffset": {
Expand All @@ -64,7 +64,7 @@ exports[`Appbar does not pass any additional props to Searchbar 1`] = `
style={
{
"alignItems": "center",
"backgroundColor": "rgb(238, 232, 244)",
"backgroundColor": "rgba(243, 237, 247, 1)",
"borderRadius": 28,
"flex": undefined,
"flexDirection": "row",
Expand Down Expand Up @@ -217,7 +217,7 @@ exports[`Appbar does not pass any additional props to Searchbar 1`] = `
accessibilityRole="search"
keyboardAppearance="light"
placeholder="Search"
placeholderTextColor="rgba(28, 27, 31, 1)"
placeholderTextColor="rgba(29, 27, 32, 1)"
returnKeyType="search"
selectionColor="rgba(103, 80, 164, 1)"
style={
Expand Down Expand Up @@ -409,7 +409,7 @@ exports[`Appbar passes additional props to AppbarBackAction, AppbarContent and A
collapsable={false}
style={
{
"backgroundColor": "rgba(255, 251, 254, 1)",
"backgroundColor": "rgba(254, 247, 255, 1)",
"height": 64,
"shadowColor": "#000",
"shadowOffset": {
Expand All @@ -427,7 +427,7 @@ exports[`Appbar passes additional props to AppbarBackAction, AppbarContent and A
style={
{
"alignItems": "center",
"backgroundColor": "rgba(255, 251, 254, 1)",
"backgroundColor": "rgba(254, 247, 255, 1)",
"flex": 1,
"flexDirection": "row",
"paddingBottom": undefined,
Expand Down Expand Up @@ -614,7 +614,7 @@ exports[`Appbar passes additional props to AppbarBackAction, AppbarContent and A
},
{
"height": 21,
"tintColor": "rgba(28, 27, 31, 1)",
"tintColor": "rgba(29, 27, 32, 1)",
"width": 21,
},
]
Expand Down Expand Up @@ -659,7 +659,7 @@ exports[`Appbar passes additional props to AppbarBackAction, AppbarContent and A
"textAlign": "left",
},
{
"color": "rgba(28, 27, 31, 1)",
"color": "rgba(29, 27, 32, 1)",
"writingDirection": "ltr",
},
[
Expand All @@ -672,7 +672,7 @@ exports[`Appbar passes additional props to AppbarBackAction, AppbarContent and A
},
[
{
"color": "rgba(28, 27, 31, 1)",
"color": "rgba(29, 27, 32, 1)",
"fontFamily": "System",
"fontSize": 22,
"fontWeight": "400",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`Card renders an outlined card 1`] = `
collapsable={false}
style={
{
"backgroundColor": "rgba(255, 251, 254, 1)",
"backgroundColor": "rgba(254, 247, 255, 1)",
"borderRadius": 12,
"shadowColor": "#000",
"shadowOffset": {
Expand All @@ -22,7 +22,7 @@ exports[`Card renders an outlined card 1`] = `
collapsable={false}
style={
{
"backgroundColor": "rgba(255, 251, 254, 1)",
"backgroundColor": "rgba(254, 247, 255, 1)",
"borderRadius": 12,
"flex": undefined,
"shadowColor": "#000",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ exports[`can render leading checkbox control 1`] = `
"textAlign": "left",
},
{
"color": "rgba(28, 27, 31, 1)",
"color": "rgba(29, 27, 32, 1)",
"writingDirection": "ltr",
},
[
Expand All @@ -164,7 +164,7 @@ exports[`can render leading checkbox control 1`] = `
"flexShrink": 1,
},
{
"color": "rgba(28, 27, 31, 1)",
"color": "rgba(29, 27, 32, 1)",
"textAlign": "right",
},
undefined,
Expand Down Expand Up @@ -244,7 +244,7 @@ exports[`can render the Android checkbox on different platforms 1`] = `
"textAlign": "left",
},
{
"color": "rgba(28, 27, 31, 1)",
"color": "rgba(29, 27, 32, 1)",
"writingDirection": "ltr",
},
[
Expand All @@ -261,7 +261,7 @@ exports[`can render the Android checkbox on different platforms 1`] = `
"flexShrink": 1,
},
{
"color": "rgba(28, 27, 31, 1)",
"color": "rgba(29, 27, 32, 1)",
"textAlign": "left",
},
undefined,
Expand Down Expand Up @@ -460,7 +460,7 @@ exports[`can render the iOS checkbox on different platforms 1`] = `
"textAlign": "left",
},
{
"color": "rgba(28, 27, 31, 1)",
"color": "rgba(29, 27, 32, 1)",
"writingDirection": "ltr",
},
[
Expand All @@ -477,7 +477,7 @@ exports[`can render the iOS checkbox on different platforms 1`] = `
"flexShrink": 1,
},
{
"color": "rgba(28, 27, 31, 1)",
"color": "rgba(29, 27, 32, 1)",
"textAlign": "left",
},
undefined,
Expand Down Expand Up @@ -640,7 +640,7 @@ exports[`renders unchecked 1`] = `
"textAlign": "left",
},
{
"color": "rgba(28, 27, 31, 1)",
"color": "rgba(29, 27, 32, 1)",
"writingDirection": "ltr",
},
[
Expand All @@ -657,7 +657,7 @@ exports[`renders unchecked 1`] = `
"flexShrink": 1,
},
{
"color": "rgba(28, 27, 31, 1)",
"color": "rgba(29, 27, 32, 1)",
"textAlign": "left",
},
undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ exports[`can render leading radio button control 1`] = `
"textAlign": "left",
},
{
"color": "rgba(28, 27, 31, 1)",
"color": "rgba(29, 27, 32, 1)",
"writingDirection": "ltr",
},
[
Expand All @@ -162,7 +162,7 @@ exports[`can render leading radio button control 1`] = `
"flexShrink": 1,
},
{
"color": "rgba(28, 27, 31, 1)",
"color": "rgba(29, 27, 32, 1)",
"textAlign": "right",
},
undefined,
Expand Down Expand Up @@ -239,7 +239,7 @@ exports[`can render the Android radio button on different platforms 1`] = `
"textAlign": "left",
},
{
"color": "rgba(28, 27, 31, 1)",
"color": "rgba(29, 27, 32, 1)",
"writingDirection": "ltr",
},
[
Expand All @@ -256,7 +256,7 @@ exports[`can render the Android radio button on different platforms 1`] = `
"flexShrink": 1,
},
{
"color": "rgba(28, 27, 31, 1)",
"color": "rgba(29, 27, 32, 1)",
"textAlign": "left",
},
undefined,
Expand Down Expand Up @@ -390,7 +390,7 @@ exports[`can render the iOS radio button on different platforms 1`] = `
"textAlign": "left",
},
{
"color": "rgba(28, 27, 31, 1)",
"color": "rgba(29, 27, 32, 1)",
"writingDirection": "ltr",
},
[
Expand All @@ -407,7 +407,7 @@ exports[`can render the iOS radio button on different platforms 1`] = `
"flexShrink": 1,
},
{
"color": "rgba(28, 27, 31, 1)",
"color": "rgba(29, 27, 32, 1)",
"textAlign": "left",
},
undefined,
Expand Down Expand Up @@ -567,7 +567,7 @@ exports[`renders unchecked 1`] = `
"textAlign": "left",
},
{
"color": "rgba(28, 27, 31, 1)",
"color": "rgba(29, 27, 32, 1)",
"writingDirection": "ltr",
},
[
Expand All @@ -584,7 +584,7 @@ exports[`renders unchecked 1`] = `
"flexShrink": 1,
},
{
"color": "rgba(28, 27, 31, 1)",
"color": "rgba(29, 27, 32, 1)",
"textAlign": "left",
},
undefined,
Expand Down
Loading
Loading