Refactor PK page and add Trellis setup
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import { isImageSource } from "../utils";
|
||||
|
||||
type WordImageProps = {
|
||||
value: string;
|
||||
label: string;
|
||||
};
|
||||
|
||||
export function WordImage({ value, label }: WordImageProps) {
|
||||
if (!value) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (isImageSource(value)) {
|
||||
return (
|
||||
<img
|
||||
src={value}
|
||||
alt={label}
|
||||
className="pk-word-image size-[clamp(54px,7vw,92px)] rounded-lg object-contain"
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
return <span className="pk-word-emoji text-[clamp(44px,6vw,76px)] leading-none">{value}</span>;
|
||||
}
|
||||
Reference in New Issue
Block a user