Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F969887
ordered-pictogram-tiles.jdd.tsx
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
ordered-pictogram-tiles.jdd.tsx
View Options
import
type
{
FlatTemplatable
}
from
"tempstream"
;
import
{
TempstreamJSX
}
from
"tempstream"
;
import
type
{
ExtractStructuredComponentArgumentsParsed
,
JDDContext
,
}
from
"@sealcode/jdd"
;
import
{
Component
,
ComponentArguments
}
from
"@sealcode/jdd"
;
const
component_arguments
=
{
elements
:
new
ComponentArguments
.
List
(
new
ComponentArguments
.
Structured
({
color
:
new
ComponentArguments
.
Enum
([
"purple"
,
"white"
]),
iconPath
:
new
ComponentArguments
.
Image
(),
iconAlt
:
new
ComponentArguments
.
ShortText
(),
title
:
new
ComponentArguments
.
ShortText
(),
description
:
new
ComponentArguments
.
Markdown
(),
})
),
}
as
const
;
export
class
OrderedPictogramTiles
extends
Component
<
typeof
component_arguments
>
{
getArguments
()
{
return
component_arguments
;
}
toHTML
(
{
elements
,
}
:
ExtractStructuredComponentArgumentsParsed
<
typeof
component_arguments
>
,
{
render_markdown
,
render_image
}
:
JDDContext
)
:
FlatTemplatable
{
return
(
<
section
class
=
"tib"
>
<
ol
class
=
"pictogram-tiles"
>
{
elements
.
map
((
element
,
index
)
=>
(
<
li
class
=
{
`pictogram-tiles__tile pictogram-tiles__tile--
${
element
.
color
}
`
}
>
<
div
class
=
"pictogram-tiles__content"
>
<
div
class
=
"pictogram-tiles__upperSection"
>
<
span
>
{(
index
+
1
).
toLocaleString
(
"en-US"
,
{
minimumIntegerDigits
:
2
,
useGrouping
:
false
,
})}
<
/span>
{
render_image
(
element
.
iconPath
,
{
container
:
{
height
:
200
,
width
:
200
,
objectFit
:
"cover"
,
},
alt
:
element
.
iconAlt
,
})}
<
/div>
<
div
class
=
"pictogram-tiles__lowerSection"
>
<
h3
>
{
element
.
title
}
<
/h3>
{
render_markdown
(
element
.
description
)}
<
/div>
<
/div>
<
/li>
))}
<
/ol>
<
/section>
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Sun, Nov 24, 02:16 (19 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
548085
Default Alt Text
ordered-pictogram-tiles.jdd.tsx (1 KB)
Attached To
Mode
rPLAY Sealious playground
Attached
Detach File
Event Timeline
Log In to Comment