@popp0102/nova 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,16 @@
1
1
  import { StyleSheet } from 'react-native';
2
2
 
3
3
  export const sizes = {
4
- tiny: 16,
5
- small: 20,
6
- medium: 24,
7
- large: 28,
4
+ h1: 64,
5
+ h2: 48,
6
+ h3: 28,
7
+ h4: 24,
8
+ h5: 20,
9
+ h6: 16,
8
10
  };
9
11
 
10
12
  export const styles = StyleSheet.create({
11
- title: {
13
+ heading: {
12
14
  fontWeight: 'bold',
13
15
  },
14
16
  });
@@ -0,0 +1,12 @@
1
+ import { Text } from "react-native";
2
+ import { sizes, styles } from './config';
3
+
4
+ export default function Heading({ children, color = 'black', size = 'h4', fontFamily }) {
5
+ const fontSize = sizes[size] || sizes.h4;
6
+
7
+ return (
8
+ <Text style={[styles.heading, { color, fontSize, fontFamily }]}>
9
+ {children}
10
+ </Text>
11
+ );
12
+ }
package/lib/index.js CHANGED
@@ -5,7 +5,7 @@ export { default as Card } from './components/Card';
5
5
  export { default as IconButton } from './components/IconButton';
6
6
  export { default as Screen } from './components/Screen';
7
7
  export { default as Subtitle } from './components/Subtitle';
8
- export { default as Title } from './components/Title';
8
+ export { default as Heading } from './components/Heading';
9
9
  export { default as FadeView } from './components/animations/FadeView';
10
10
  export { default as SlideView } from './components/animations/SlideView';
11
11
  export { default as ShakeView } from './components/animations/ShakeView';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@popp0102/nova",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "description": "React Native component library",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.js",
@@ -1,12 +0,0 @@
1
- import { Text } from "react-native";
2
- import { sizes, styles } from './config';
3
-
4
- export default function Title({ children, color = 'black', size = 'medium' }) {
5
- const fontSize = sizes[size] || sizes.medium;
6
-
7
- return (
8
- <Text style={[styles.title, { color, fontSize }]}>
9
- {children}
10
- </Text>
11
- );
12
- }