Por algum motivo o browser está estourando esse Warning que mais tarde parece me gerar mais problemas:
**
client.js:1 Warning: React does not recognize the styleSheet
prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase stylesheet
instead. If you accidentally passed it from a parent component, remove it from the DOM element.**
Código:
import React from "react";
import styled from "styled-components";
import { StyleSheet } from '@src/theme/StyleSheet';
import { parseStyleSheet } from "@skynexui/responsive_stylesheet";
interface StyledBaseComponent {
styleSheet?: StyleSheet;
}
const StyledBaseComponent = styled.div<StyledBaseComponent>`
${({ styleSheet }) => parseStyleSheet(styleSheet)}
`;
export const BaseComponent = (props) => {
return (
<StyledBaseComponent {...props} />
)
}
BaseComponent.defaultProps = {
styleSheet: {},
}
import { BaseComponent } from "@src/theme/BaseComponent";
import { StyleSheet } from "@src/theme/StyleSheet";
import React from "react";
interface BoxProps {
tag: any;
children: React.ReactNode;
styleSheet: StyleSheet;
}
export default function Box({ styleSheet, children, tag }: BoxProps) {
const Tag = tag || 'div';
return (
<BaseComponent as={Tag} styleSheet={styleSheet}>
{children}
</BaseComponent>
)
}
Tentei solucionar de todas as formas e até mesmo segui o passo a passo das aulas, mas não consegui solucionar esse problema, agradeço a ajuda.