Common front-end components for Web using the Tesseract design system, written for React. https://make.modal.sh/tesseract/web/react/common
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

1234567891011121314
  1. import ReactIs from 'react-is'
  2. declare global {
  3. namespace jest {
  4. interface Matchers<R> {
  5. toBeComponent(): R,
  6. }
  7. }
  8. }
  9. export const toBeComponent = (received: any) => ({
  10. message: () => `expected ${received} to be a component`,
  11. pass: ReactIs.isValidElementType(received),
  12. })