Skip to content

Commit

Permalink
some updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ilz5753 committed Mar 9, 2024
1 parent 80e0901 commit 7ef379c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ilz5753/rnutils",
"version": "0.2.2",
"version": "0.2.3",
"description": "React Native Utils",
"main": "lib/commonjs/index",
"module": "lib/module/index",
Expand Down
13 changes: 13 additions & 0 deletions src/current/styles/dynamic/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -765,3 +765,16 @@ export function ReWrapper({
/>
);
}
type AVP = AnimatedProps<ViewProps>;
export interface AnimatedLayoutViewProps
extends Pick<AVP, 'entering' | 'exiting' | 'children' | 'style'> {}
export function AnimatedLayoutView(props: AnimatedLayoutViewProps) {
return (
<ReView
{...{
layout: LinearTransition,
...props,
}}
/>
);
}
9 changes: 8 additions & 1 deletion src/current/styles/static/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,14 @@ export const fh = height('100%');
export const full = [fw, fh];
export const transparent = 'transparent';
export const center = getStyle(['aic', 'jcc']);
export const row = getStyle('fdr');
export const row = (isRTL = false, spaceBetweenItems = 0) => [
getStyle([`fdr${isRTL ? 'r' : ''}`, `aic`]),
gap(spaceBetweenItems),
];
export const ta = (isRTL = false) => getStyle([`ta${isRTL ? 'r' : 'l'}`]);
export function rtlComparer<T>(left: T, right: T) {
return (isRTL = false) => (isRTL ? right : left);
}
export const pa = getStyle('pa');
export const overlay1 = [pa, zIndex(1)];
export const overlayMax = [pa, zIndex(10e12)];

0 comments on commit 7ef379c

Please sign in to comment.