From 9a7a7033ff075a7d496049e9eb3449dff67d5647 Mon Sep 17 00:00:00 2001 From: Hugo Alliaume Date: Fri, 4 Jan 2019 22:04:10 +0100 Subject: [PATCH] feat(settings): `type` is now a string type, add `min` and `max` prop --- src/settings/index.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/settings/index.ts b/src/settings/index.ts index 2309ae4..195d132 100644 --- a/src/settings/index.ts +++ b/src/settings/index.ts @@ -8,12 +8,16 @@ export interface InterfaceSettings { } export interface InterfaceSettingsItem { - type: 'boolean'; + type: string; label: string; help?: string; - defaultValue?: any; - value?: any; children?: InterfaceSettings; + // for any type + value?: any; + defaultValue?: any; + // when type is `range' + min?: number; + max?: number; } export const getSettings = (): InterfaceSettings => _settings;