[英]How to display readonly field with 3 attributes while taking user input in ReactJS?
The user will select currency,write amount, and select time(hour,day,month,year).用户将 select 币种,写入金额,select 时间(时、日、月、年)。 I need to make a functional component which takes all these values provided by user and displays a read-only value in 1 box (as show).我需要制作一个功能组件,它采用用户提供的所有这些值并在 1 个框中显示一个只读值(如图所示)。
The user input box is supposed to look like this用户输入框应该是这样的
Also, It would be very helpful if anybody can style it similarly or atleast tell how can I. (using CSS, scss, antD, tailwind anything).此外,如果有人可以类似地设计它或至少告诉我如何设计,那将非常有帮助。(使用 CSS、scss、antD、tailwind 任何东西)。
PS: Don't avoid mentioning the placeholder. PS:不要避免提及占位符。
Try to do it step by step.尝试一步一步地去做。 Create what you want in the simplest/ugliest way possible.以最简单/最丑陋的方式创造你想要的东西。 It doesn't matter how it looks, if it works it is enough.不管它看起来如何,只要它有效就足够了。
div
to display the currency symbol.您需要创建一个组件,该组件呈现货币的 select、时间的 select、价值的输入和显示货币符号的div
。value
and onChange
that receives from the parent component.您的组件应该能够处理从父组件接收的value
和onChange
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.