Wener Notes

styled-components

约 1 分钟阅读

FAQ

This JSX tag's 'children' prop expects type 'never' which requires multiple children, but only a single child was provided.

TSX
const Container = styled.div``;

// omit ref,as
export const FakeInput: React.FC<Omit<HTMLProps<HTMLDivElement>, 'children' | 'ref' | 'as'>> = (props) => {
  return <Container {...props}>Hello</Container>;
};

关联信息

反向链接、本文链接的其他页面和外部资料。

反向链接

  • Web Awesome
    笔记 · styled-components

    https://www.c82.net/iconography/ · https://www.photopea.com/ · ryohey/signal · MIT, TS · Online MIDI Editor: signal · http://oskarstalberg.com/Townscaper/

References

GitHub1 条
最近更新commit c48877aEdit

On this page