From 79d0f5f371956411908039157bf0e37bed3c4ffb Mon Sep 17 00:00:00 2001 From: Jeremias Peier Date: Thu, 5 May 2022 08:16:53 +0200 Subject: [PATCH] fix: fix min size of buttons and add animation duration tokens --- designTokens/animation.js | 33 ++++++++++++++++++++++++--------- designTokens/size.js | 8 ++++---- 2 files changed, 28 insertions(+), 13 deletions(-) diff --git a/designTokens/animation.js b/designTokens/animation.js index d4153843..95c7bf81 100644 --- a/designTokens/animation.js +++ b/designTokens/animation.js @@ -1,16 +1,31 @@ /* eslint-disable sort-keys */ +const baseDuration = 40; +const duration = (value) => value * Number(baseDuration); module.exports = { - form: { - element: { - state: { - duration: { - value: '180ms' - }, - easing: { - value: 'cubic-bezier(.47, .1, 1, .63)' - } + animation: { + duration: { + '-1x': { + value: duration(1) + }, + '-2x': { + value: duration(2) + }, + '-3x': { + value: duration(3) + }, + '-4x': { + value: duration(4) + }, + '-5x': { + value: duration(5) + }, + '-6x': { + value: duration(6) } + }, + easing: { + value: 'cubic-bezier(.47, .1, 1, .63)' } } }; diff --git a/designTokens/size.js b/designTokens/size.js index d500cafd..86a0753c 100644 --- a/designTokens/size.js +++ b/designTokens/size.js @@ -13,15 +13,15 @@ module.exports = { min: { height: { zero: { - value: 40, + value: 44, ...attributes('form') }, micro: { - value: 40, + value: 44, ...attributes('form') }, small: { - value: 40, + value: 44, ...attributes('form') }, medium: { @@ -81,7 +81,7 @@ module.exports = { }, touch: { min: { - value: 48, + value: 44, ...attributes('touch') } },