Skip to content

ridi/react-components

Repository files navigation

@ridi/web-ui

Install

$ npm install @ridi/web-ui

Support TypeScript

import * as React from 'react';
import { Book } from '@ridi/web-ui';

interface BookCoverProps {
  bookId: string
  width: number
}

const BookCover: React.FC<BookCoverProps> = props => {
  const { bookId, width } = props;
  return (
    <>
      <Book.Thumbnail
        thumbnailWidth={width}
        thumbnailUrl={`https://misc.ridibooks.com/cover/${bookId}/xxlarge`}
      />
    </>
  )
}