feat: Add flat
design for widget (#4065)
This commit is contained in:
parent
dcecbf4b80
commit
6c94768bdb
18 changed files with 251 additions and 109 deletions
11
app/javascript/sdk/settingsHelper.js
Normal file
11
app/javascript/sdk/settingsHelper.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
import { BUBBLE_DESIGN, WIDGET_DESIGN } from './constants';
|
||||
|
||||
export const getBubbleView = type =>
|
||||
BUBBLE_DESIGN.includes(type) ? type : BUBBLE_DESIGN[0];
|
||||
|
||||
export const isExpandedView = type => getBubbleView(type) === BUBBLE_DESIGN[1];
|
||||
|
||||
export const getWidgetStyle = style =>
|
||||
WIDGET_DESIGN.includes(style) ? style : WIDGET_DESIGN[0];
|
||||
|
||||
export const isFlatWidgetStyle = style => style === 'flat';
|
Loading…
Add table
Add a link
Reference in a new issue