Skip to content

Commit

Permalink
fix: apply size to style directly to prevent warnings on size
Browse files Browse the repository at this point in the history
  • Loading branch information
SeDemal committed Aug 1, 2024
1 parent 26615d8 commit b293783
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/widgets/src/dns-hole/summary/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const StatCard = ({ item, data, usePiHoleColors }: StatCardProps) => {
direction={isLong ? "row" : "column"}
style={{ containerType: "size" }}
>
<item.icon className="summary-card-icon" size="50cqmin" style={{ margin: "2cqmin" }} />
<item.icon className="summary-card-icon" style={{ margin: "2cqmin", height: "50cqmin", width: "50cqmin" }} />
<Flex
className="summary-card-texts"
justify="center"
Expand Down
2 changes: 1 addition & 1 deletion packages/widgets/src/modals/widget-edit-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const WidgetEditModal = createModal<ModalProps<WidgetKind>>(({ actions, i
objectEntries(widgetImports[innerProps.kind].definition.options).reduce(
(acc, [key, value]: [string, { validate?: z.ZodType<unknown> }]) => {
if (value.validate) {
acc[key] = value.validate;
acc[key] = value.validate.or(z.array(value.validate));
}

return acc;
Expand Down
2 changes: 1 addition & 1 deletion packages/widgets/src/rssFeed/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default function RssFeed({ serverData, options }: WidgetComponentProps<"r

const InfoDisplay = ({ date }: { date: string }) => (
<Group gap="2.5cqmin">
<IconClock size="2.5cqmin" />
<IconClock style={{ height: "3cqmin", width: "3cqmin"}}/>
<Text size="2.5cqmin" c="dimmed" pt="1cqmin">
{date}
</Text>
Expand Down
2 changes: 1 addition & 1 deletion packages/widgets/src/weather/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const WeeklyForecast = ({ options, weather }: WeatherProps) => {
<Group className="weather-forecast-city-temp-group" wrap="nowrap" gap="5cqmin">
{options.showCity && (
<>
<IconMapPin size="20cqmin" />
<IconMapPin style={{ height: "20cqmin", width: "20cqmin" }} />
<Text size="15cqmin" style={{ whiteSpace: "nowrap" }}>
{options.location.name}
</Text>
Expand Down
2 changes: 1 addition & 1 deletion packages/widgets/src/weather/icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ interface WeatherIconProps {
export const WeatherIcon = ({ code, size = 50 }: WeatherIconProps) => {
const { icon: Icon } = weatherDefinitions.find((definition) => definition.codes.includes(code)) ?? unknownWeather;

return <Icon style={{ float: "left" }} size={size} />;
return <Icon style={{ float: "left", height: size, width: size }} />;
};

interface WeatherDescriptionProps {
Expand Down

0 comments on commit b293783

Please sign in to comment.