mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Webatrice: card import wizard (#4397)
This commit is contained in:
parent
dde0f568d9
commit
36e5a399d5
41 changed files with 1479 additions and 35 deletions
4
webclient/src/components/Token/Token.css
Normal file
4
webclient/src/components/Token/Token.css
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
.token {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
19
webclient/src/components/Token/Token.tsx
Normal file
19
webclient/src/components/Token/Token.tsx
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
// eslint-disable-next-line
|
||||
import React, { useMemo, useState } from 'react';
|
||||
|
||||
import { TokenDTO } from 'services';
|
||||
|
||||
import './Token.css';
|
||||
|
||||
interface TokenProps {
|
||||
token: TokenDTO;
|
||||
}
|
||||
|
||||
const Token = ({ token }: TokenProps) => {
|
||||
const set = Array.isArray(token?.set) ? token?.set[0] : token?.set;
|
||||
return token && (
|
||||
<img className="token" src={set?.picURL} alt={token?.name?.value} />
|
||||
);
|
||||
}
|
||||
|
||||
export default Token;
|
||||
Loading…
Add table
Add a link
Reference in a new issue