I recently created a React library called https://github.com/deadcoder0904/react-typical/ and added styles to the component in the examples/
directory. However, I've noticed that the styles are not being applied.
Below is the content of the example/index.tsx
file:
import 'react-app-polyfill/ie11';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { ReactTypical } from '../.'
const App = () => {
const textArray = ['Innovator', 'Visionary', 'Creator', 'Leader'];
return (
<>
<ReactTypical
style={{
color: 'blue',
fontSize: 200,
}}
steps={textArray.flatMap(text => [text, 4000])}
loop={Infinity}
/>
</>
);
};
ReactDOM.render(<App />, document.getElementById('root'));
The style
property has already been implemented in the library's src/index.tsx
file:
export type Props = {
steps: Array<any>;
loop: number;
className?: string;
wrapper?: keyof JSX.IntrinsicElements;
} & React.HTMLAttributes<HTMLOrSVGElement>;
Considering that React.HTMLAttributes
covers all HTML attributes within React components, the style
attribute should be accessible there.
Am I overlooking something in my implementation?