react, nextjs error | Type 'string' is not assignable to type 'TextAlign'

preview_player
Показать описание
Join this channel to get access to perks:

My Gear



My Youtube Channels


My Wife's Channel

Websites

Connect with me
Рекомендации по теме
Комментарии
Автор

Or you can cast the type to Property.TextAlign
as shown below.

import { Property } from "csstype";
let centerObject = {
minHeight: "200px",
display: "grid",
placeContent: "center",
backgroundColor: "black",
color: "white",
textAlign: "center" as Property.TextAlign,
};

Sagarclips
welcome to shbcf.ru