Skip to content

Instantly share code, notes, and snippets.

@winkerVSbecks
Created September 4, 2018 14:48
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save winkerVSbecks/7a97adca77b5cc00c8c47f538d727600 to your computer and use it in GitHub Desktop.
Save winkerVSbecks/7a97adca77b5cc00c8c47f538d727600 to your computer and use it in GitHub Desktop.
static propertyControls: PropertyControls = {
text: { type: ControlType.String, title: 'Text' },
fontSize: {
type: ControlType.FusedNumber,
toggleKey: 'fontPerBP',
toggleTitles: ['Font', 'Font per BP'],
valueKeys: ['font1', 'font2', 'font3', 'font4'],
valueLabels: theme.breakpoints.map(s => s.replace('px', '')),
min: 0,
title: 'Font Size',
},
color: {
type: ControlType.Enum,
options: ['text.0', 'text.1', 'text.2', 'text.3'],
optionTitles: ['Black', 'Grey', 'Light Grey', 'Dark Grey'],
},
margin: {
type: ControlType.FusedNumber,
toggleKey: 'marginPerSide',
toggleTitles: ['Margin', 'Margin per Side'],
valueKeys: ['mt', 'mr', 'mb', 'ml'],
valueLabels: ['T', 'R', 'B', 'L'],
min: 0,
title: 'Margin',
},
padding: {
type: ControlType.FusedNumber,
toggleKey: 'paddingPerSide',
toggleTitles: ['Padding', 'Padding per Side'],
valueKeys: ['mt', 'mr', 'mb', 'ml'],
valueLabels: ['T', 'R', 'B', 'L'],
min: 0,
title: 'Padding',
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment