Skip to content
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

💣 feat: add new system in Box and Text #835

Merged
merged 3 commits into from
Aug 1, 2024
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
1 change: 1 addition & 0 deletions packages/system/src/newSystem/defaultProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const props = {
mv: 'marginVertical',
mh: 'marginHorizontal',
bRadius: 'borderRadius',
bc: 'borderColor',
};

export default props;
4 changes: 2 additions & 2 deletions packages/yoga/src/Box/native/Box.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styled from 'styled-components';
import { system } from '@gympass/yoga-system';
import { newSystem } from '@gympass/yoga-system';

const Box = styled.View(system);
const Box = styled.View(newSystem);

export default Box;
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ exports[`<EventCard /> Snapshots should match snapshot of small EventCard active
"borderStyle": "solid",
"borderWidth": 1,
"justifyContent": "center",
"paddingBottom": 20,
"paddingTop": 20,
"paddingVertical": 20,
"width": 56,
},
]
Expand Down Expand Up @@ -275,8 +274,7 @@ exports[`<EventCard /> Snapshots should match snapshot of small EventCard with d
"borderStyle": "solid",
"borderWidth": 1,
"justifyContent": "center",
"paddingBottom": 20,
"paddingTop": 20,
"paddingVertical": 20,
"width": 56,
},
]
Expand Down Expand Up @@ -445,8 +443,7 @@ exports[`<EventCard /> Snapshots should match snapshot of small EventCard with e
"borderStyle": "solid",
"borderWidth": 1,
"justifyContent": "center",
"paddingBottom": 20,
"paddingTop": 20,
"paddingVertical": 20,
"width": 56,
},
]
Expand Down Expand Up @@ -619,8 +616,7 @@ exports[`<EventCard /> Snapshots should match snapshot of small EventCard with e
"borderStyle": "solid",
"borderWidth": 1,
"justifyContent": "center",
"paddingBottom": 20,
"paddingTop": 20,
"paddingVertical": 20,
"width": 56,
},
]
Expand Down
4 changes: 2 additions & 2 deletions packages/yoga/src/Text/native/Text.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React from 'react';
import styled from 'styled-components';
import { oneOf, bool } from 'prop-types';
import { system } from '@gympass/yoga-system';
import { newSystem } from '@gympass/yoga-system';
import textStyle from '../textStyle';
import { deprecated } from '../../shared';

const styledText = type => styled.Text`
${textStyle(type)}
${system}
${newSystem}
`;

const Display1 = styledText('display1');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1194,10 +1194,8 @@ exports[`<Text /> Snapshots should match snapshot with spacing prop system 1`] =
"marginLeft": 20,
"marginRight": 20,
"marginTop": 20,
"paddingBottom": 24,
"paddingLeft": 16,
"paddingRight": 16,
"paddingTop": 24,
"paddingHorizontal": 16,
"paddingVertical": 24,
},
]
}
Expand Down
Loading