only put heavy components if truly needed
This commit is contained in:
parent
5e77a0a23d
commit
4ff257be57
12 changed files with 33 additions and 58 deletions
|
|
@ -1,27 +0,0 @@
|
||||||
export default {
|
|
||||||
name: 'Attachment',
|
|
||||||
selector: '.Attachment',
|
|
||||||
notEditable: true,
|
|
||||||
validInnerComponents: [
|
|
||||||
'Border',
|
|
||||||
'Button',
|
|
||||||
'Input'
|
|
||||||
],
|
|
||||||
defaultRules: [
|
|
||||||
{
|
|
||||||
directives: {
|
|
||||||
roundness: 3
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
component: 'Button',
|
|
||||||
parent: {
|
|
||||||
component: 'Attachment'
|
|
||||||
},
|
|
||||||
directives: {
|
|
||||||
background: '#FFFFFF',
|
|
||||||
opacity: 0.5
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -8,9 +8,9 @@ export default {
|
||||||
'Text',
|
'Text',
|
||||||
'Icon',
|
'Icon',
|
||||||
'Border',
|
'Border',
|
||||||
'Button',
|
// Optimization: don't put heavy components unless needed
|
||||||
|
// 'Button',
|
||||||
'RichContent',
|
'RichContent',
|
||||||
'Attachment',
|
|
||||||
'PollGraph'
|
'PollGraph'
|
||||||
],
|
],
|
||||||
defaultRules: [
|
defaultRules: [
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,9 @@ export default {
|
||||||
'Link',
|
'Link',
|
||||||
'Icon',
|
'Icon',
|
||||||
'Border',
|
'Border',
|
||||||
'Button',
|
// Optimization: don't put heavy components unless needed
|
||||||
'ButtonUnstyled',
|
// 'Button',
|
||||||
|
// 'ButtonUnstyled',
|
||||||
'RichContent',
|
'RichContent',
|
||||||
'Input',
|
'Input',
|
||||||
'Avatar'
|
'Avatar'
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,10 @@ export default {
|
||||||
'Link',
|
'Link',
|
||||||
'Icon',
|
'Icon',
|
||||||
'Border',
|
'Border',
|
||||||
'Button',
|
// Optimization: don't put heavy components unless needed
|
||||||
'ButtonUnstyled',
|
// 'Button',
|
||||||
'Input',
|
// 'ButtonUnstyled',
|
||||||
|
// 'Input',
|
||||||
'PanelHeader',
|
'PanelHeader',
|
||||||
'MenuItem',
|
'MenuItem',
|
||||||
'Notification',
|
'Notification',
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,12 @@ export default {
|
||||||
'Link',
|
'Link',
|
||||||
'Icon',
|
'Icon',
|
||||||
'Border',
|
'Border',
|
||||||
'Button',
|
// Optimization: don't put heavy components unless needed
|
||||||
'ButtonUnstyled',
|
// 'Button',
|
||||||
|
// 'ButtonUnstyled',
|
||||||
'RichContent',
|
'RichContent',
|
||||||
'Input',
|
// 'Input',
|
||||||
'Avatar',
|
'Avatar',
|
||||||
'Attachment',
|
|
||||||
'PollGraph'
|
'PollGraph'
|
||||||
],
|
],
|
||||||
defaultRules: []
|
defaultRules: []
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,10 @@ export default {
|
||||||
'Link',
|
'Link',
|
||||||
'Icon',
|
'Icon',
|
||||||
'Border',
|
'Border',
|
||||||
'Button',
|
// Optimization: don't put heavy components unless needed
|
||||||
'ButtonUnstyled',
|
// 'Button',
|
||||||
'Input',
|
// 'ButtonUnstyled',
|
||||||
|
// 'Input',
|
||||||
'PanelHeader',
|
'PanelHeader',
|
||||||
'MenuItem',
|
'MenuItem',
|
||||||
'Post',
|
'Post',
|
||||||
|
|
@ -16,7 +17,6 @@ export default {
|
||||||
'Alert',
|
'Alert',
|
||||||
'UserCard',
|
'UserCard',
|
||||||
'Chat',
|
'Chat',
|
||||||
'Attachment',
|
|
||||||
'Tab',
|
'Tab',
|
||||||
'ListItem'
|
'ListItem'
|
||||||
],
|
],
|
||||||
|
|
@ -25,8 +25,9 @@ export default {
|
||||||
'Link',
|
'Link',
|
||||||
'Icon',
|
'Icon',
|
||||||
'Border',
|
'Border',
|
||||||
'Button',
|
// Optimization: don't put heavy components unless needed
|
||||||
'Input',
|
// 'Button',
|
||||||
|
// 'Input',
|
||||||
'PanelHeader',
|
'PanelHeader',
|
||||||
'Alert'
|
'Alert'
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,10 @@ export default {
|
||||||
'Link',
|
'Link',
|
||||||
'Icon',
|
'Icon',
|
||||||
'Border',
|
'Border',
|
||||||
'Button',
|
// Optimization: don't put heavy components unless needed
|
||||||
'ButtonUnstyled',
|
// 'Button',
|
||||||
'Input',
|
// 'ButtonUnstyled',
|
||||||
|
// 'Input',
|
||||||
'MenuItem',
|
'MenuItem',
|
||||||
'Post',
|
'Post',
|
||||||
'UserCard'
|
'UserCard'
|
||||||
|
|
|
||||||
|
|
@ -9,12 +9,12 @@ export default {
|
||||||
'Link',
|
'Link',
|
||||||
'Icon',
|
'Icon',
|
||||||
'Border',
|
'Border',
|
||||||
'Button',
|
// Optimization: don't put heavy components unless needed
|
||||||
'ButtonUnstyled',
|
// 'Button',
|
||||||
|
// 'ButtonUnstyled',
|
||||||
'RichContent',
|
'RichContent',
|
||||||
'Input',
|
'Input',
|
||||||
'Avatar',
|
'Avatar',
|
||||||
'Attachment',
|
|
||||||
'PollGraph'
|
'PollGraph'
|
||||||
],
|
],
|
||||||
validInnerComponentsLite: [
|
validInnerComponentsLite: [
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,9 @@ export default {
|
||||||
'Link',
|
'Link',
|
||||||
'Text',
|
'Text',
|
||||||
'Icon',
|
'Icon',
|
||||||
'Button',
|
// Optimization: don't put heavy components unless needed
|
||||||
'ButtonUnstyled',
|
// 'Button',
|
||||||
|
// 'ButtonUnstyled',
|
||||||
'Input',
|
'Input',
|
||||||
'Badge'
|
'Badge'
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,9 @@ export default {
|
||||||
'Text',
|
'Text',
|
||||||
'Link',
|
'Link',
|
||||||
'Icon',
|
'Icon',
|
||||||
'Button',
|
// Optimization: don't put heavy components unless needed
|
||||||
'ButtonUnstyled',
|
// 'Button',
|
||||||
|
// 'ButtonUnstyled',
|
||||||
'Input',
|
'Input',
|
||||||
'RichContent',
|
'RichContent',
|
||||||
'Alert'
|
'Alert'
|
||||||
|
|
|
||||||
|
|
@ -244,9 +244,6 @@ export const convertTheme2To3 = (data) => {
|
||||||
case 'tooltip':
|
case 'tooltip':
|
||||||
rule.component = 'Popover'
|
rule.component = 'Popover'
|
||||||
break
|
break
|
||||||
case 'attachment':
|
|
||||||
rule.component = 'Attachment'
|
|
||||||
break
|
|
||||||
case 'ChatMessage':
|
case 'ChatMessage':
|
||||||
rule.component = 'Button'
|
rule.component = 'Button'
|
||||||
break
|
break
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,6 @@ const components = {
|
||||||
Icon: null,
|
Icon: null,
|
||||||
Border: null,
|
Border: null,
|
||||||
PanelHeader: null,
|
PanelHeader: null,
|
||||||
Attachment: null,
|
|
||||||
Panel: null,
|
Panel: null,
|
||||||
Chat: null,
|
Chat: null,
|
||||||
ChatMessage: null,
|
ChatMessage: null,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue