react-chessboard-svg
v1.1.1
Published
The React Chessboard SVG Library used at ChessOpenings.co.uk.
Downloads
10
Maintainers
Readme
react-chessboard-svg
The React Chessboard SVG Library used at ChessOpenings.co.uk
What is react-chessboard-svg?
react-chessboard-svg is a React component that generates an SVG of a chessboard when provided a FEN string.
Link to react-chessboard and ChessOpenings.co.uk
Installation
npm i react-chessboard-svg
Usage
import { ChessboardSVG } from 'react-chessboard-svg';
export default function App() {
return <ChessboardSVG fen="r1bqkbnr/pppp1ppp/2n5/4p3/2B1P3/5N2/PPPP1PPP/RNBQK2R b KQkq - 3 3" />;
}
Contributing
- Fork this repository
- Clone your forked repository onto your development machine
git clone https://github.com/yourUsernameHere/react-chessboard-svg.git
cd react-chessboard-svg
- Create a branch for your PR
git checkout -b your-branch-name
- Set upstream remote
git remote add upstream https://github.com/Clariity/react-chessboard-svg.git
- Make your changes
- Test your changes using the example folder
npm run build
cd example
npm start
- Push your changes
git add .
git commit -m "feature/cool-new-feature"
git push --set-upstream origin your-branch-name
- Create pull request on GitHub
- Contribute again
git checkout main
git pull upstream main
git checkout -b your-new-branch-name
LICENSE
MIT