Skip to content
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
6 changes: 6 additions & 0 deletions .changeset/nativewind-home-layout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'create-expo-stack': patch
'rn-new': patch
---

Fix Nativewind template layout: inset the Show Details button from the screen edges, constrain EditScreenInfo so its description text wraps instead of clipping, type TabBarIcon color as ColorValue for SDK 56 tabs, and only quote the rerun-hint project name when it needs shell quoting.
4 changes: 2 additions & 2 deletions cli/src/templates/base/components/TabBarIcon.tsx.ejs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import FontAwesome from '@expo/vector-icons/FontAwesome';
import { StyleSheet } from 'react-native';
import { ColorValue, StyleSheet } from 'react-native';

export const TabBarIcon = (props: {
name: React.ComponentProps<typeof FontAwesome>['name'];
color: string;
color: ColorValue;
}) => {
return <FontAwesome size={28} style={styles.tabBarIcon} {...props} />;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ export default function Home() {
<Link href={{ pathname: '/details', params: { name: 'Dan' } }} asChild>
<% if (props.stylingPackage?.name === "unistyles") { %>
<Button title="Show Details" style={styles.button} />
<% } else if (props.stylingPackage?.name === "nativewind") { %>
<Button title="Show Details" className="mx-6" />
<% } else { %>
<Button title="Show Details" />
<% } %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const EditScreenInfo: React.FC<EditScreenInfoProps> = ({ path }) => {
const description = "Change any of the text, save the file, and your app will automatically update."
<% } %>
return (
<View>
<View className={styles.container}>
<View className={styles.getStartedContainer}>
<Text className={styles.getStartedText}>{title}</Text>
<View className={`${styles.codeHighlightContainer} ${styles.homeScreenFilename}`}>
Expand All @@ -33,6 +33,7 @@ export const EditScreenInfo: React.FC<EditScreenInfoProps> = ({ path }) => {
};

const styles = {
container: `w-full`,
codeHighlightContainer: `rounded-md px-1`,
getStartedContainer: `items-center mx-12`,
getStartedText: `text-lg leading-6 text-center`,
Expand Down
5 changes: 5 additions & 0 deletions cli/src/utilities/systemCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ type STDIO = 'inherit' | 'ignore' | 'pipe' | 'overlapped';
export const ONLY_ERRORS = ['ignore', 'ignore', 'inherit'] as const;

export function quoteShellArg(value: string): string {
// Values made of safe characters don't need quoting on any platform
if (/^[A-Za-z0-9._-]+$/.test(value)) {
return value;
}

if (process.platform === 'win32') {
return `"${value.replace(/"/g, '""')}"`;
}
Expand Down
Loading