forked from tsai/budibase
8 changed files with 7941 additions and 63 deletions
File diff suppressed because it is too large
@ -0,0 +1,70 @@ |
|||||
|
<script> |
||||
|
export let icon = "" |
||||
|
export let name = "" |
||||
|
export let description = "" |
||||
|
</script> |
||||
|
|
||||
|
<div class="component-item"> |
||||
|
<div class="component-icon"> |
||||
|
<i class={icon} /> |
||||
|
</div> |
||||
|
<div class="component-text"> |
||||
|
<div class="component-name">{name}</div> |
||||
|
<div class="component-description"> |
||||
|
<p>{description}</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<style> |
||||
|
.component-item { |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
padding: 10px 0px 8px 10px; |
||||
|
align-items: center; |
||||
|
cursor: pointer; |
||||
|
} |
||||
|
|
||||
|
.component-item:hover { |
||||
|
background: #f5f5f5; |
||||
|
/* background: #fbfbfb; */ |
||||
|
border-radius: 5px; |
||||
|
} |
||||
|
|
||||
|
.component-icon { |
||||
|
flex: 0 0 40px; |
||||
|
/* background: #efe9e9; */ |
||||
|
background: #f1f4fc; |
||||
|
height: 40px; |
||||
|
border-radius: 5px; |
||||
|
display: flex; |
||||
|
justify-content: center; |
||||
|
align-items: center; |
||||
|
} |
||||
|
|
||||
|
.component-text { |
||||
|
display: flex; |
||||
|
padding-left: 16px; |
||||
|
padding-top: 8px; |
||||
|
flex-direction: column; |
||||
|
} |
||||
|
|
||||
|
.component-name { |
||||
|
font-size: 14px; |
||||
|
font-weight: 500; |
||||
|
} |
||||
|
|
||||
|
.component-description { |
||||
|
font-size: 12px; |
||||
|
color: #808192; |
||||
|
} |
||||
|
|
||||
|
p { |
||||
|
line-height: 15px; |
||||
|
} |
||||
|
|
||||
|
i { |
||||
|
font-size: 28px; |
||||
|
/* color: #808192; */ |
||||
|
} |
||||
|
</style> |
||||
@ -1,5 +1,10 @@ |
|||||
<script> |
<script> |
||||
|
import Item from "./Item.svelte" |
||||
export let components |
export let components |
||||
|
|
||||
|
console.log("Components: ", components) |
||||
</script> |
</script> |
||||
|
|
||||
{#each components as component}{component.component}{/each} |
{#each components as { icon, name, description }} |
||||
|
<Item {icon} {name} {description} /> |
||||
|
{/each} |
||||
|
|||||
@ -0,0 +1,75 @@ |
|||||
|
{ |
||||
|
"categories": [ |
||||
|
{ |
||||
|
"name": "Basic", |
||||
|
"components": [ |
||||
|
{ |
||||
|
"component": "Container", |
||||
|
"description": "This component contains things within itself", |
||||
|
"icon": "ri-layout-row-fill", |
||||
|
"commonProps": {}, |
||||
|
"type": [] |
||||
|
}, |
||||
|
{ |
||||
|
"component": "Text", |
||||
|
"description": "This is a simple text component", |
||||
|
"icon": "ri-t-box-fill", |
||||
|
"commonProps": { |
||||
|
}, |
||||
|
"type": [ |
||||
|
{ |
||||
|
"_component": "@budibase/standard-components/header", |
||||
|
"name": "Headline", |
||||
|
"icon": "headline", |
||||
|
"props": { |
||||
|
"type": { |
||||
|
"type": "options", |
||||
|
"options": [ |
||||
|
"h1", |
||||
|
"h2" |
||||
|
], |
||||
|
"default": "h1" |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
"_component": "@budibase/standard-components/text", |
||||
|
"name": "Paragraph", |
||||
|
"icon": "paragraph", |
||||
|
"props": { |
||||
|
} |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
{ |
||||
|
"component": "Button", |
||||
|
"description": "A basic html button that is ready for styling", |
||||
|
"icon": "ri-radio-button-fill", |
||||
|
"commonProps": {}, |
||||
|
"type": [] |
||||
|
}, |
||||
|
{ |
||||
|
"component": "Icon", |
||||
|
"description": "A basic component for displaying icons", |
||||
|
"icon": "ri-sun-fill", |
||||
|
"commonProps": {}, |
||||
|
"type": [] |
||||
|
}, |
||||
|
{ |
||||
|
"component": "Avatar", |
||||
|
"description": "A basic component for rendering an avatar", |
||||
|
"icon": "ri-user-smile-fill", |
||||
|
"commonProps": {}, |
||||
|
"type": [] |
||||
|
}, |
||||
|
{ |
||||
|
"component": "Link", |
||||
|
"description": "A basic link component for internal and external links", |
||||
|
"icon": "ri-link", |
||||
|
"commonProps": {}, |
||||
|
"type": [] |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
] |
||||
|
} |
||||
Loading…
Reference in new issue