Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F7188149
input-wrapper.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
566 B
Referenced Files
None
Subscribers
None
input-wrapper.ts
View Options
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
(
type
:
string
,
modifiers
:
string
[],
input
:
FlatTemplatable
)
:
Promise
<
string
>
{
return
tempstream
/* HTML */
`<div
class="form-input form-input--type-
${
type
}
form-input__wrapper
${
getModifierClasses
(
modifiers
)
}
"
>
${
input
}
</div>`
;
}
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Tue, Jul 8, 07:53 (23 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
625009
Default Alt Text
input-wrapper.ts (566 B)
Attached To
Mode
rSGEN sealgen
Attached
Detach File
Event Timeline
Log In to Comment