Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F3010107
input-wrapper.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
547 B
Referenced Files
None
Subscribers
None
input-wrapper.ts
View Options
import
{
Readable
}
from
"stream"
;
import
{
FlatTemplatable
,
tempstream
}
from
"tempstream"
;
export
function
getRequiredClass
(
isRequired
:
boolean
)
:
string
{
return
isRequired
?
"required"
:
""
;
}
function
getModifierClasses
(
modifiers
:
string
[])
{
return
modifiers
.
map
((
m
)
=>
"form-input__wrapper--"
+
m
).
join
(
" "
);
}
export
function
inputWrapper
(
modifiers
:
string
[],
input
:
FlatTemplatable
)
:
Readable
{
return
tempstream
/* HTML */
`<div
class="form-input form-input__wrapper
${
getModifierClasses
(
modifiers
)
}
"
>
${
input
}
</div>`
;
}
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Wed, May 7, 19:36 (1 d, 18 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
626710
Default Alt Text
input-wrapper.ts (547 B)
Attached To
Mode
rSGEN sealgen
Attached
Detach File
Event Timeline
Log In to Comment