Skip to content
Open
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
10 changes: 5 additions & 5 deletions example/__tests__/ios/widget-snapshots.harness.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { View } from 'react-native'
import { afterAll, beforeAll, describe, expect, Mock, render, spyOn, test } from 'react-native-harness'
import { VoltraWidgetPreview } from 'voltra/client'

import { IosWeatherWidget } from '../../widgets/ios/IosWeatherWidget'
import { WeatherWidget } from '../../widgets/ios/IosWeatherWidget'
import { SAMPLE_WEATHER_DATA } from '../../widgets/weather-types'

describe('Widget snapshots', () => {
Expand Down Expand Up @@ -34,7 +34,7 @@ describe('Widget snapshots', () => {
<View style={previewWrapperStyle}>
<View testID="voltra-preview" style={previewStyle}>
<VoltraWidgetPreview family="systemSmall">
<IosWeatherWidget weather={SAMPLE_WEATHER_DATA.sunny} />
<WeatherWidget weather={SAMPLE_WEATHER_DATA.sunny} />
</VoltraWidgetPreview>
</View>
</View>
Expand All @@ -52,7 +52,7 @@ describe('Widget snapshots', () => {
<View style={previewWrapperStyle}>
<View testID="voltra-preview" style={previewStyle}>
<VoltraWidgetPreview family="systemSmall">
<IosWeatherWidget weather={SAMPLE_WEATHER_DATA.rainy} />
<WeatherWidget weather={SAMPLE_WEATHER_DATA.rainy} />
</VoltraWidgetPreview>
</View>
</View>
Expand All @@ -70,7 +70,7 @@ describe('Widget snapshots', () => {
<View style={previewWrapperStyle}>
<View testID="voltra-preview" style={previewStyle}>
<VoltraWidgetPreview family="systemSmall">
<IosWeatherWidget weather={SAMPLE_WEATHER_DATA.snowy} />
<WeatherWidget weather={SAMPLE_WEATHER_DATA.snowy} />
</VoltraWidgetPreview>
</View>
</View>
Expand All @@ -88,7 +88,7 @@ describe('Widget snapshots', () => {
<View style={previewWrapperStyle}>
<View testID="voltra-preview" style={previewStyle}>
<VoltraWidgetPreview family="systemSmall">
<IosWeatherWidget weather={SAMPLE_WEATHER_DATA.stormy} />
<WeatherWidget weather={SAMPLE_WEATHER_DATA.stormy} />
</VoltraWidgetPreview>
</View>
</View>
Expand Down
2 changes: 1 addition & 1 deletion example/widgets/ios/IosWeatherWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ interface WeatherWidgetProps {
weather?: WeatherData
}

export const IosWeatherWidget = ({ weather = DEFAULT_WEATHER }: WeatherWidgetProps) => {
export const WeatherWidget = ({ weather = DEFAULT_WEATHER }: WeatherWidgetProps) => {
const gradient = WEATHER_GRADIENTS[weather.condition]
const emoji = WEATHER_EMOJIS[weather.condition]
const description = WEATHER_DESCRIPTIONS[weather.condition]
Expand Down
8 changes: 4 additions & 4 deletions example/widgets/ios/ios-weather-initial.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import type { WidgetVariants } from 'voltra'

import { IosWeatherWidget } from './IosWeatherWidget'
import { WeatherWidget } from './IosWeatherWidget'

const initialState: WidgetVariants = {
systemSmall: <IosWeatherWidget />,
systemMedium: <IosWeatherWidget />,
systemLarge: <IosWeatherWidget />,
systemSmall: <WeatherWidget />,
systemMedium: <WeatherWidget />,
systemLarge: <WeatherWidget />,
}

export default initialState