Skip to content

Commit 2ea0cd7

Browse files
author
Artur Bien
committed
refactor(types): export Theme type
1 parent cb5078a commit 2ea0cd7

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

example/src/examples/CardExample.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const CardExample = () => {
2727
<Container.Section title='No elevation:'>
2828
<Card elevation={0} style={[{ height: 100 }]}>
2929
<Card.Content>
30-
<Text linkUrl='https://react95.io'>React95 website</Text>
30+
<Text>React95</Text>
3131
</Card.Content>
3232
</Card>
3333
</Container.Section>

example/src/util/LocalThemeContext.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import React, { createContext, useState } from 'react';
2-
3-
import type { Theme } from 'react95-native';
4-
import { themes } from 'react95-native';
2+
import { themes, Theme } from 'react95-native';
53

64
type TLocalThemeContext = {
75
theme: Theme;

example/src/util/ThemeButton.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ import {
55
TouchableHighlight,
66
ImageBackground,
77
} from 'react-native';
8-
import { Text, Panel, ThemeProvider } from 'react95-native';
9-
import type { Theme } from 'react95-native';
8+
import { Text, Panel, ThemeProvider, Theme } from 'react95-native';
109

1110
type Props = {
1211
onPress: () => void;

src/Button/Button.spec.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React from 'react';
22
import { render, fireEvent } from '@testing-library/react-native';
3-
3+
import type { Sizes } from '../types';
44
import { blockSizes } from '../common/styles';
5-
import { ButtonSizes, testId } from './Button';
5+
import { testId } from './Button';
66
import { Button, Text } from '..';
77

88
const noop = () => {};
@@ -32,7 +32,7 @@ describe('<Button />', () => {
3232
});
3333

3434
it('should handle square sizes', () => {
35-
const sizes: ButtonSizes[] = ['sm', 'md', 'lg'];
35+
const sizes: Sizes[] = ['sm', 'md', 'lg'];
3636

3737
sizes.forEach(size => {
3838
const { getByTestId } = render(

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ export { default as Card } from './Card';
2222
export { default as Snackbar } from './Snackbar';
2323

2424
export * from './common/theming';
25+
26+
export { Theme } from './types';

0 commit comments

Comments
 (0)