Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Framer X wrapper components #17797

Merged
merged 20 commits into from
Nov 6, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
random prettier issue
mbrookes committed Oct 22, 2019
commit 51dc003fabb053428b49d9da4078540ec130e0ec
141 changes: 60 additions & 81 deletions framer/scripts/framerConfig.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Generate types but not controls
export const ignoredControls = ['children', 'width', 'height']
export const ignoredControls = ['children', 'width', 'height'];

export const componentSettings = {
all: {
@@ -13,8 +13,8 @@ export const componentSettings = {
'name',
'.*Props',
'.*Ref',
'aria.*'
]
'aria.*',
],
},
Avatar: {
ignoredProps: ['alt', 'imgProps', 'sizes', 'src', 'srcSet'],
@@ -27,9 +27,9 @@ export const componentSettings = {
imageUrl: "'https://i.pravatar.cc/300'",
label: "'MB'",
width: 40,
height: 40
height: 40,
},
template: 'avatar.txt'
template: 'avatar.txt',
},
Badge: {
ignoredProps: [
@@ -38,32 +38,32 @@ export const componentSettings = {
'color',
'disableFocusRipple',
'invisible',
'overlap'
'overlap',
],
propValues: {
icon: "''",
theme: 'Filled',
badgeContent: "'8'",
badgeColor: "'primary'",
width: 22,
height: 22
height: 22,
},
style: {
display: 'flex',
alignItems: 'center',
justifyContent: 'center'
justifyContent: 'center',
},
template: 'badge.txt'
template: 'badge.txt',
},
BottomNavigation: {
ignoredProps: ['children', 'onChange', 'ScrollButtonComponent', 'value'],
propValues: {
icons: "['restore', 'favorite', 'location_on', 'folder']",
labels: "['Recents', 'Favorites', 'Nearby', 'Saved']",
width: 500,
height: 56
height: 56,
},
template: 'bottom_navigation.txt'
template: 'bottom_navigation.txt',
},
Button: {
ignoredProps: ['children', 'disableFocusRipple'],
@@ -74,9 +74,9 @@ export const componentSettings = {
endIconTheme: 'Filled',
label: "'Button'",
width: 100,
height: 38
height: 38,
},
template: 'button.txt'
template: 'button.txt',
},
Checkbox: {
ignoredProps: [
@@ -87,15 +87,15 @@ export const componentSettings = {
'onChange',
'required',
'type',
'value'
'value',
],
propValues: {
label: "'Checkbox'",
width: 100,
height: 42,
checked: false
checked: false,
},
template: 'selection_control.txt'
template: 'selection_control.txt',
},
Chip: {
ignoredProps: ['avatar', 'children', 'onDelete'],
@@ -109,9 +109,9 @@ export const componentSettings = {
iconTheme: 'Filled',
label: "'Chip'",
width: 100,
height: 32
height: 32,
},
template: 'chip.txt'
template: 'chip.txt',
},
CircularProgress: {
ignoredProps: ['disableShrink', 'size'],
@@ -121,13 +121,13 @@ export const componentSettings = {
size: 44,
thickness: 4,
progressValue: 75,
variant: "'static'"
variant: "'static'",
},
style: {
width: 'width',
height: 'height'
height: 'height',
},
template: 'circular_progress.txt'
template: 'circular_progress.txt',
},
Fab: {
ignoredProps: ['children', 'disableFocusRipple'],
@@ -136,19 +136,19 @@ export const componentSettings = {
iconTheme: 'Filled',
label: "'extended'",
width: 56,
height: 56
height: 56,
},
template: 'fab.txt'
template: 'fab.txt',
},
Icon: {
ignoredProps: ['children', 'fontSize'],
propValues: {
icon: "'add'",
theme: 'Filled',
width: 24,
height: 24
height: 24,
},
template: 'icon.txt'
template: 'icon.txt',
},
IconButton: {
ignoredProps: ['children', 'edge', 'disableRipple', 'disableFocusRipple'],
@@ -158,9 +158,9 @@ export const componentSettings = {
badgeContent: "''",
badgeColor: "'default'",
width: 48,
height: 48
height: 48,
},
template: 'icon_button.txt'
template: 'icon_button.txt',
},
ListItem: {
ignoredProps: ['children', 'ContainerComponent', 'ContainerProps'],
@@ -175,9 +175,9 @@ export const componentSettings = {
imageFile: "''",
imageUrl: "''",
secondaryAction: "'none'",
secondaryIcon: "''"
secondaryIcon: "''",
},
template: 'list_item.txt'
template: 'list_item.txt',
},
LinearProgress: {
ignoredProps: [],
@@ -186,60 +186,47 @@ export const componentSettings = {
height: 5,
progressValue: 75,
valueBuffer: 75,
variant: "'determinate'"
variant: "'determinate'",
},
template: 'self_closing.txt'
template: 'self_closing.txt',
},
MuiThemeProvider: {
ignoredProps: [
'disableStylesGeneration',
'options',
'sheetsManager',
'theme'
],
ignoredProps: ['disableStylesGeneration', 'options', 'sheetsManager', 'theme'],
propValues: {
paletteType: 'light',
primary: "'#3f51b5'",
secondary: "'#f50057'",
error: "'#f44336'"
error: "'#f44336'",
},
template: 'theme_provider.txt'
template: 'theme_provider.txt',
},
Paper: {
ignoredProps: [],
propValues: {
width: 100,
height: 100,
elevation: 2
elevation: 2,
},
template: 'paper.txt'
template: 'paper.txt',
},
Radio: {
ignoredProps: [
'checked',
'checkedIcon',
'icon',
'onChange',
'required',
'type',
'value'
],
ignoredProps: ['checked', 'checkedIcon', 'icon', 'onChange', 'required', 'type', 'value'],
propValues: {
label: "'Radio'",
width: "'100%'",
height: 42
height: 42,
},
template: 'radio.txt'
template: 'radio.txt',
},
RadioGroup: {
ignoredProps: ['children', 'defaultValue', 'onChange', 'value'],
propValues: {
labels: "['Paris', 'New York', 'London']",
label: "'Radio group'",
width: 160,
height: 180
height: 180,
},
template: 'radio_group.txt'
template: 'radio_group.txt',
},
Slider: {
ignoredProps: [
@@ -252,41 +239,33 @@ export const componentSettings = {
'value',
'ValueLabelComponent',
'valueLabelFormat',
'marks'
'marks',
],
propValues: {
width: 160,
height: 24
height: 24,
},
template: 'slider.txt'
template: 'slider.txt',
},
SnackbarContent: {
ignoredProps: ['action'],
propValues: {
width: 568,
height: 48,
message: "'I love candy. I love cookies. I love cupcakes.'",
label: "'Nom nom nom'"
label: "'Nom nom nom'",
},
template: 'snackbar_content.txt'
template: 'snackbar_content.txt',
},
Switch: {
ignoredProps: [
'checkedIcon',
'edge',
'icon',
'onChange',
'required',
'type',
'value'
],
ignoredProps: ['checkedIcon', 'edge', 'icon', 'onChange', 'required', 'type', 'value'],
propValues: {
label: "'Switch'",
width: 100,
height: 38,
checked: 'false'
checked: 'false',
},
template: 'switch.txt'
template: 'switch.txt',
},
Tabs: {
ignoredProps: [
@@ -295,16 +274,16 @@ export const componentSettings = {
'onChange',
'orientation',
'ScrollButtonComponent',
'value'
'value',
],
propValues: {
appBarColor: "'primary'",
icons: "['phone', 'favorite', 'person_pin']",
labels: "['Tab 1', 'Tab 2', 'Tab 3']",
width: 500,
height: 64
height: 64,
},
template: 'tabs.txt'
template: 'tabs.txt',
},
TextField: {
// FIXME: defaultValue - fix `Union`
@@ -317,16 +296,16 @@ export const componentSettings = {
'rowsMax',
'select',
'type',
'value'
'value',
],
propValues: {
helperText: "''",
label: "'TextField'",
width: 280,
height: 56,
fullWidth: true
fullWidth: true,
},
template: 'self_closing.txt'
template: 'self_closing.txt',
},
Typography: {
ignoredProps: [
@@ -335,13 +314,13 @@ export const componentSettings = {
'gutterBottom',
'internalDeprecatedVariant',
'paragraph',
'variantMapping'
'variantMapping',
],
propValues: {
label: "'Typography'",
width: 100,
height: 38
height: 38,
},
template: 'label_as_children.txt'
}
}
template: 'label_as_children.txt',
},
};