sketch-draw-slice-over-selection
Version:
A Sketch plugin to draw a slice over the selection
32 lines (29 loc) • 598 B
JavaScript
import {
openSettingsDialog,
saveSettings,
showSuccessMessage,
NUMERIC_TEXT_BOX,
TEXT_BOX
} from 'sketch-plugin-helper'
const settingsConfig = {
title: 'Settings for Draw Slice Over Selection',
formFields: [
{
type: TEXT_BOX,
key: 'backgroundColor',
label: 'Background Color'
},
{
type: NUMERIC_TEXT_BOX,
key: 'padding',
label: 'Padding'
}
]
}
export default function settings () {
const settings = openSettingsDialog(settingsConfig)
if (settings) {
saveSettings(settings)
showSuccessMessage('Saved settings')
}
}