Skip to content
This repository has been archived by the owner on Mar 4, 2019. It is now read-only.

Commit

Permalink
Feat: Updated LocalizedPrice web styles
Browse files Browse the repository at this point in the history
Summary: Added component web style. Style can now also be further extended with `style` prop.
  • Loading branch information
JosefDuda authored and RobinCsl committed Feb 13, 2019
1 parent 7f02ef9 commit 0420d17
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
14 changes: 12 additions & 2 deletions src/LocalizedPrice/LocalizedPrice.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,27 @@ import { defaultTokens } from '@kiwicom/orbit-design-tokens';

import { Text } from '../Text';
import { StyleSheet } from '../PlatformStyleSheet';
import type { LocalizedPriceProps } from './LocalizedPriceTypes';
import type { StylePropType } from '../PlatformStyleSheet/StyleTypes';

type LocalizedPriceProps = {|
+localizedPrice: string,
+style?: StylePropType,
|};

export default function LocalizedPrice({
localizedPrice,
style,
}: LocalizedPriceProps) {
return <Text style={styles.price}>{localizedPrice}</Text>;
return <Text style={[styles.price, style]}>{localizedPrice}</Text>;
}
const styles = StyleSheet.create({
price: {
fontWeight: 'bold',
color: defaultTokens.colorTextLinkPrimary,
fontSize: parseFloat(defaultTokens.fontSizeTextLarge),
web: {
color: '#2e353b', // // @TODO repeating value - should be added to design-tokens
fontSize: 18,
},
},
});
5 changes: 0 additions & 5 deletions src/LocalizedPrice/LocalizedPriceTypes.js

This file was deleted.

0 comments on commit 0420d17

Please sign in to comment.