Skip to content

Layouts - to design tokens #1949

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 7, 2022
Merged
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
4 changes: 2 additions & 2 deletions demo/src/screens/componentScreens/CarouselScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class CarouselScreen extends Component<Props, State> {

return (
<ScrollView showsVerticalScrollIndicator={false}>
<Text h1 margin-20>
<Text h1 margin-20 $textDefault>
Carousel
</Text>

Expand Down Expand Up @@ -115,7 +115,6 @@ class CarouselScreen extends Component<Props, State> {
containerStyle={{height: 160}}
pageControlPosition={Carousel.pageControlPositions.UNDER}
pageControlProps={{onPagePress: this.onPagePress, limitShownPages}}
// showCounter
allowAccessibleLayout
>
{_.map([...Array(numberOfPagesShown)], (item, index) => (
Expand Down Expand Up @@ -143,6 +142,7 @@ class CarouselScreen extends Component<Props, State> {
containerStyle: styles.loopCarousel
}}
pageControlPosition={Carousel.pageControlPositions.OVER}
showCounter
>
{IMAGES.map((image, i) => {
return (
Expand Down
8 changes: 7 additions & 1 deletion src/components/carousel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,13 @@ class Carousel extends Component<CarouselProps, CarouselState> {
const {pageControlPosition, pageControlProps = {}} = this.props;

if (pageControlPosition) {
const {size = 6, spacing = 8, color = Colors.grey20, inactiveColor = Colors.grey60, ...others} = pageControlProps;
const {
size = 6,
spacing = 8,
color = Colors.$backgroundNeutralHeavy,
inactiveColor = Colors.$backgroundNeutralMedium,
...others
} = pageControlProps;
const pagesCount = presenter.getChildrenLength(this.props);
const containerStyle =
pageControlPosition === PageControlPosition.UNDER
Expand Down
13 changes: 6 additions & 7 deletions src/components/gridListItem/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import _ from 'lodash';
import React, {Component} from 'react';
import {StyleProp, StyleSheet, ViewStyle} from 'react-native';
import _ from 'lodash';
import * as Modifiers from '../../commons/modifiers';
import {Colors, Spacings, Typography} from 'style';
import View, {ViewProps} from '../view';
import Text from '../text';
import TouchableOpacity, {TouchableOpacityProps} from '../touchableOpacity';
import Text from '../text';
import Image, {ImageProps} from '../image';

export interface GridListItemProps {
Expand Down Expand Up @@ -165,17 +165,17 @@ class GridListItem extends Component<GridListItemProps> {
children,
title,
titleTypography,
titleColor,
titleColor = Colors.$textDefault,
titleLines,
overlayText,
overlayTextContainerStyle,
subtitle,
subtitleTypography,
subtitleColor,
subtitleColor = Colors.$textDefault,
subtitleLines,
description,
descriptionTypography,
descriptionColor,
descriptionColor = Colors.$textDefault,
descriptionLines,
onPress,
renderOverlay
Expand Down Expand Up @@ -255,8 +255,7 @@ const styles = StyleSheet.create({
},
description: {
textAlign: 'center',
...Typography.subtext,
color: Colors.grey30
...Typography.subtext
},
contentAlignedToStart: {
textAlign: 'left'
Expand Down
2 changes: 1 addition & 1 deletion src/components/skeletonView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ class SkeletonView extends Component<InternalSkeletonViewProps, SkeletonState> {
}

return {
shimmerColors: colors || [Colors.grey70, Colors.grey60, Colors.grey70],
shimmerColors: colors || [Colors.$backgroundNeutral, Colors.$backgroundNeutralMedium, Colors.$backgroundNeutral],
isReversed: Constants.isRTL,
style: [{borderRadius}, style],
width: size || width,
Expand Down