Skip to content

Commit 3aa028c

Browse files
committed
📝 Add Masonry component example to home page
1 parent 45a573b commit 3aa028c

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

src/pages/index.astro

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import Group from '@components/Group/Group.astro'
1919
import Icon from '@components/Icon/Icon.astro'
2020
import Input from '@components/Input/Input.astro'
2121
import List from '@components/List/List.astro'
22+
import Masonry from '@components/Masonry/Masonry.astro'
2223
import Menu from '@components/Menu/Menu.astro'
2324
import Pagination from '@components/Pagination/Pagination.astro'
2425
import Progress from '@components/Progress/Progress.astro'
@@ -44,6 +45,7 @@ import {
4445
avatarGroup,
4546
avatarGroupAlt2,
4647
listPreview,
48+
masonryItems,
4749
themes
4850
} from '@data'
4951
@@ -143,6 +145,7 @@ const tabItems = [{
143145
'Name'
144146
]}
145147
data={[['1', 'John Doe']]}
148+
className="data-table"
146149
/>
147150
</CardWrapper>
148151
<CardWrapper title="Footer" href="/footer">
@@ -193,6 +196,9 @@ const tabItems = [{
193196
searchBarPlaceholder="Search items..."
194197
/>
195198
</CardWrapper>
199+
<CardWrapper title="Masonry" href="/masonry">
200+
<Masonry items={masonryItems} className="masonry" />
201+
</CardWrapper>
196202
<CardWrapper title="Menu" href="/menu">
197203
<Menu className="menu-example">
198204
<Fragment set:html={logo} />
@@ -276,6 +282,8 @@ const tabItems = [{
276282
</Layout>
277283

278284
<style is:global lang="scss">
285+
@import '../scss/config.scss';
286+
279287
h2.my {
280288
margin-top: 100px;
281289
}
@@ -316,7 +324,9 @@ const tabItems = [{
316324
}
317325

318326
.carousel-example {
319-
width: 100%;
327+
@include position(absolute);
328+
@include spacing(p-md);
329+
@include size('w100%');
320330
}
321331

322332
.menu-example {
@@ -327,4 +337,15 @@ const tabItems = [{
327337
margin: 20px 0;
328338
justify-content: center;
329339
}
340+
341+
.masonry {
342+
@include position(absolute);
343+
344+
transform: scale(0.75);
345+
}
346+
347+
.data-table {
348+
@include position(absolute);
349+
@include spacing(p-default);
350+
}
330351
</style>

0 commit comments

Comments
 (0)