Skip to content

Instantly share code, notes, and snippets.

@judell
Created January 13, 2026 06:58
Show Gist options
  • Select an option

  • Save judell/e771fab5ff94398b7f705e449edb78c6 to your computer and use it in GitHub Desktop.

Select an option

Save judell/e771fab5ff94398b7f705e449edb78c6 to your computer and use it in GitHub Desktop.
newstack-refactor-after
<!-- after -->
<HStack>
<WeatherStat
label="Cloud Cover"
value="{condition.cloudcover}%"
/>
<WeatherStat
label="Humidity"
value="{condition.humidity}%"
/>
<WeatherStat
label="Wind Speed"
value="{condition.windspeedMiles} mph"
/>
</HStack>
<!-- a new component -->
<Component name="WeatherStat">
<VStack
gap="$space-1"
minWidth="8rem"
>
<Text
variant="secondary"
fontSize="$fontSize-sm"
>
{$props.label}
</Text>
<Text fontWeight="semibold">
{$props.value}
</Text>
</VStack>
</Component>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment