2021-11-05 10:25:05 +00:00
|
|
|
import {CursorPos} from 'app/client/components/Cursor';
|
|
|
|
import {GristDoc} from 'app/client/components/GristDoc';
|
|
|
|
import {ColumnRec} from 'app/client/models/entities/ColumnRec';
|
2021-03-17 03:45:44 +00:00
|
|
|
import {buildHighlightedCode, cssCodeBlock} from 'app/client/ui/CodeHighlight';
|
2022-08-08 13:32:50 +00:00
|
|
|
import {cssBlockedCursor, cssLabel, cssRow} from 'app/client/ui/RightPanelStyles';
|
2021-06-29 04:47:59 +00:00
|
|
|
import {buildFormulaTriggers} from 'app/client/ui/TriggerFormulas';
|
2021-11-05 10:25:05 +00:00
|
|
|
import {textButton} from 'app/client/ui2018/buttons';
|
|
|
|
import {colors, testId} from 'app/client/ui2018/cssVars';
|
2021-03-17 03:45:44 +00:00
|
|
|
import {textInput} from 'app/client/ui2018/editableLabel';
|
|
|
|
import {cssIconButton, icon} from 'app/client/ui2018/icons';
|
2022-03-22 13:41:11 +00:00
|
|
|
import {IconName} from 'app/client/ui2018/IconList';
|
2021-11-05 10:25:05 +00:00
|
|
|
import {selectMenu, selectOption, selectTitle} from 'app/client/ui2018/menus';
|
2022-03-22 13:41:11 +00:00
|
|
|
import {createFormulaErrorObs, cssError} from 'app/client/widgets/FormulaEditor';
|
2021-03-17 03:45:44 +00:00
|
|
|
import {sanitizeIdent} from 'app/common/gutil';
|
2022-01-25 09:38:21 +00:00
|
|
|
import {bundleChanges, Computed, dom, DomContents, DomElementArg, fromKo, MultiHolder,
|
2022-03-22 13:41:11 +00:00
|
|
|
Observable, styled} from 'grainjs';
|
2021-06-08 07:07:20 +00:00
|
|
|
import * as ko from 'knockout';
|
2021-03-17 03:45:44 +00:00
|
|
|
|
2021-06-08 07:07:20 +00:00
|
|
|
export function buildNameConfig(owner: MultiHolder, origColumn: ColumnRec, cursor: ko.Computed<CursorPos>) {
|
2021-03-17 03:45:44 +00:00
|
|
|
const untieColId = origColumn.untieColIdFromLabel;
|
|
|
|
|
|
|
|
const editedLabel = Observable.create(owner, '');
|
|
|
|
const editableColId = Computed.create(owner, editedLabel, (use, edited) =>
|
|
|
|
'$' + (edited ? sanitizeIdent(edited) : use(origColumn.colId)));
|
|
|
|
const saveColId = (val: string) => origColumn.colId.saveOnly(val.startsWith('$') ? val.slice(1) : val);
|
|
|
|
|
2022-01-25 09:38:21 +00:00
|
|
|
const isSummaryTable = Computed.create(owner, use => Boolean(use(use(origColumn.table).summarySourceTable)));
|
2021-06-08 07:07:20 +00:00
|
|
|
// We will listen to cursor position and force a blur event on
|
|
|
|
// the text input, which will trigger save before the column observable
|
|
|
|
// will change its value.
|
|
|
|
// Otherwise, blur will be invoked after column change and save handler will
|
|
|
|
// update a different column.
|
|
|
|
let editor: HTMLInputElement | undefined;
|
|
|
|
owner.autoDispose(
|
|
|
|
cursor.subscribe(() => {
|
|
|
|
editor?.blur();
|
|
|
|
})
|
|
|
|
);
|
|
|
|
|
2021-03-17 03:45:44 +00:00
|
|
|
return [
|
|
|
|
cssLabel('COLUMN LABEL AND ID'),
|
|
|
|
cssRow(
|
2022-01-25 09:38:21 +00:00
|
|
|
dom.cls(cssBlockedCursor.className, origColumn.disableModify),
|
2021-03-17 03:45:44 +00:00
|
|
|
cssColLabelBlock(
|
2021-06-08 07:07:20 +00:00
|
|
|
editor = textInput(fromKo(origColumn.label),
|
2021-03-17 03:45:44 +00:00
|
|
|
async val => { await origColumn.label.saveOnly(val); editedLabel.set(''); },
|
|
|
|
dom.on('input', (ev, elem) => { if (!untieColId.peek()) { editedLabel.set(elem.value); } }),
|
|
|
|
dom.boolAttr('disabled', origColumn.disableModify),
|
|
|
|
testId('field-label'),
|
|
|
|
),
|
|
|
|
textInput(editableColId,
|
|
|
|
saveColId,
|
|
|
|
dom.boolAttr('disabled', use => use(origColumn.disableModify) || !use(origColumn.untieColIdFromLabel)),
|
|
|
|
cssCodeBlock.cls(''),
|
|
|
|
{style: 'margin-top: 8px'},
|
|
|
|
testId('field-col-id'),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
cssColTieBlock(
|
|
|
|
cssColTieConnectors(),
|
|
|
|
cssToggleButton(icon('FieldReference'),
|
|
|
|
cssToggleButton.cls('-selected', (use) => !use(untieColId)),
|
2022-01-18 11:48:57 +00:00
|
|
|
dom.on('click', () => !origColumn.disableModify.peek() && untieColId.saveOnly(!untieColId.peek())),
|
|
|
|
cssToggleButton.cls("-disabled", origColumn.disableModify),
|
2021-03-17 03:45:44 +00:00
|
|
|
testId('field-derive-id')
|
|
|
|
),
|
|
|
|
)
|
|
|
|
),
|
2022-01-25 09:38:21 +00:00
|
|
|
dom.maybe(isSummaryTable,
|
|
|
|
() => cssRow('Column options are limited in summary tables.'))
|
2021-03-17 03:45:44 +00:00
|
|
|
];
|
|
|
|
}
|
|
|
|
|
2021-11-30 08:59:04 +00:00
|
|
|
type SaveHandler = (column: ColumnRec, formula: string) => Promise<void>;
|
2021-11-05 10:25:05 +00:00
|
|
|
type BuildEditor = (
|
|
|
|
cellElem: Element,
|
|
|
|
editValue?: string,
|
2021-11-30 08:59:04 +00:00
|
|
|
onSave?: SaveHandler,
|
2021-11-05 10:25:05 +00:00
|
|
|
onCancel?: () => void) => void;
|
|
|
|
|
|
|
|
type BEHAVIOR = "empty"|"formula"|"data";
|
2021-03-17 03:45:44 +00:00
|
|
|
|
|
|
|
export function buildFormulaConfig(
|
2021-04-20 21:57:45 +00:00
|
|
|
owner: MultiHolder, origColumn: ColumnRec, gristDoc: GristDoc, buildEditor: BuildEditor
|
2021-03-17 03:45:44 +00:00
|
|
|
) {
|
|
|
|
|
2021-11-05 10:25:05 +00:00
|
|
|
// Intermediate state - user wants to specify formula, but haven't done yet
|
|
|
|
const maybeFormula = Observable.create(owner, false);
|
|
|
|
|
|
|
|
// Intermediate state - user wants to specify formula, but haven't done yet
|
|
|
|
const maybeTrigger = Observable.create(owner, false);
|
|
|
|
|
2022-01-25 09:38:21 +00:00
|
|
|
// If this column belongs to a summary table.
|
|
|
|
const isSummaryTable = Computed.create(owner, use => Boolean(use(use(origColumn.table).summarySourceTable)));
|
|
|
|
|
2021-11-05 10:25:05 +00:00
|
|
|
// Column behaviour. There are 3 types of behaviors:
|
|
|
|
// - empty: isFormula and formula == ''
|
|
|
|
// - formula: isFormula and formula != ''
|
|
|
|
// - data: not isFormula nd formula == ''
|
|
|
|
const behavior = Computed.create<BEHAVIOR|null>(owner, (use) => {
|
|
|
|
// When no id column is invalid, show nothing.
|
|
|
|
if (!use(origColumn.id)) { return null; }
|
|
|
|
// Column is a formula column, when it is a formula column with valid formula or will be a formula.
|
|
|
|
if (use(origColumn.isRealFormula) || use(maybeFormula)) { return "formula"; }
|
|
|
|
// If column is not empty, or empty but wants to be a trigger
|
|
|
|
if (use(maybeTrigger) || !use(origColumn.isEmpty)) { return "data"; }
|
|
|
|
return "empty";
|
|
|
|
});
|
|
|
|
|
|
|
|
// Reference to current editor, we will open it when user wants to specify a formula or trigger.
|
|
|
|
// And close it dispose it when user opens up behavior menu.
|
|
|
|
let formulaField: HTMLElement|null = null;
|
|
|
|
|
|
|
|
// Helper function to clear temporary state (will be called when column changes or formula editor closes)
|
|
|
|
const clearState = () => bundleChanges(() => {
|
|
|
|
maybeFormula.set(false);
|
|
|
|
maybeTrigger.set(false);
|
|
|
|
formulaField = null;
|
|
|
|
});
|
|
|
|
|
|
|
|
// Clear state when column has changed
|
|
|
|
owner.autoDispose(origColumn.id.subscribe(clearState));
|
2021-11-30 08:59:04 +00:00
|
|
|
owner.autoDispose(origColumn.formula.subscribe(clearState));
|
|
|
|
owner.autoDispose(origColumn.isFormula.subscribe(clearState));
|
2021-11-05 10:25:05 +00:00
|
|
|
|
|
|
|
// Menu helper that will show normal menu with some default options
|
|
|
|
const menu = (label: DomContents, options: DomElementArg[]) =>
|
|
|
|
cssRow(
|
|
|
|
selectMenu(
|
|
|
|
label,
|
|
|
|
() => options,
|
|
|
|
testId("field-behaviour"),
|
|
|
|
// HACK: Menu helper will add tabindex to this element, which will make
|
|
|
|
// this element focusable and will steal focus from clipboard. This in turn,
|
|
|
|
// will not dispose the formula editor when menu is clicked.
|
|
|
|
(el) => el.removeAttribute("tabindex"),
|
2022-01-25 09:38:21 +00:00
|
|
|
dom.cls(cssBlockedCursor.className, origColumn.disableModify),
|
2021-11-05 10:25:05 +00:00
|
|
|
dom.cls("disabled", origColumn.disableModify)),
|
|
|
|
);
|
|
|
|
|
|
|
|
// Behaviour label
|
|
|
|
const behaviorName = Computed.create(owner, behavior, (use, type) => {
|
|
|
|
if (type === 'formula') { return "Formula Column"; }
|
|
|
|
if (type === 'data') { return "Data Column"; }
|
|
|
|
return "Empty Column";
|
|
|
|
});
|
|
|
|
const behaviorIcon = Computed.create<IconName>(owner, (use) => {
|
|
|
|
return use(behaviorName) === "Data Column" ? "Database" : "Script";
|
|
|
|
});
|
|
|
|
const behaviourLabel = () => selectTitle(behaviorName, behaviorIcon);
|
|
|
|
|
|
|
|
// Actions on select menu:
|
|
|
|
|
|
|
|
// Converts data column to formula column.
|
|
|
|
const convertDataColumnToFormulaOption = () => selectOption(
|
|
|
|
() => (maybeFormula.set(true), formulaField?.focus()),
|
|
|
|
'Clear and make into formula', 'Script');
|
|
|
|
|
|
|
|
// Converts to empty column and opens up the editor. (label is the same, but this is used when we have no formula)
|
|
|
|
const convertTriggerToFormulaOption = () => selectOption(
|
|
|
|
() => gristDoc.convertIsFormula([origColumn.id.peek()], {toFormula: true, noRecalc: true}),
|
|
|
|
'Clear and make into formula', 'Script');
|
|
|
|
|
|
|
|
// Convert column to data.
|
|
|
|
// This method is also available through a text button.
|
|
|
|
const convertToData = () => gristDoc.convertIsFormula([origColumn.id.peek()], {toFormula: false, noRecalc: true});
|
|
|
|
const convertToDataOption = () => selectOption(
|
|
|
|
convertToData,
|
2022-01-25 09:38:21 +00:00
|
|
|
'Convert column to data', 'Database',
|
|
|
|
dom.cls('disabled', isSummaryTable)
|
|
|
|
);
|
2021-11-05 10:25:05 +00:00
|
|
|
|
|
|
|
// Clears the column
|
|
|
|
const clearAndResetOption = () => selectOption(
|
|
|
|
() => gristDoc.clearColumns([origColumn.id.peek()]),
|
|
|
|
'Clear and reset', 'CrossSmall');
|
|
|
|
|
|
|
|
// Actions on text buttons:
|
|
|
|
|
|
|
|
// Tries to convert data column to a trigger column.
|
|
|
|
const convertDataColumnToTriggerColumn = () => {
|
|
|
|
maybeTrigger.set(true);
|
|
|
|
// Open the formula editor.
|
|
|
|
formulaField?.focus();
|
|
|
|
};
|
|
|
|
|
|
|
|
// Converts formula column to trigger formula column.
|
|
|
|
const convertFormulaToTrigger = () =>
|
|
|
|
gristDoc.convertIsFormula([origColumn.id.peek()], {toFormula: false, noRecalc: false});
|
|
|
|
|
|
|
|
const setFormula = () => (maybeFormula.set(true), formulaField?.focus());
|
|
|
|
const setTrigger = () => (maybeTrigger.set(true), formulaField?.focus());
|
|
|
|
|
2021-11-30 08:59:04 +00:00
|
|
|
// Actions on save formula. Those actions are using column that comes from FormulaEditor.
|
|
|
|
// Formula editor scope is broader then RightPanel, it can be disposed after RightPanel is closed,
|
|
|
|
// and in some cases, when window is in background, it won't be disposed at all when panel is closed.
|
2021-11-05 10:25:05 +00:00
|
|
|
|
2021-11-30 08:59:04 +00:00
|
|
|
// Converts column to formula column.
|
|
|
|
const onSaveConvertToFormula = async (column: ColumnRec, formula: string) => {
|
|
|
|
// For non formula column, we will not convert it to formula column when expression is empty,
|
|
|
|
// as it means we were trying to convert data column to formula column, but changed our mind.
|
2021-11-05 10:25:05 +00:00
|
|
|
const notBlank = Boolean(formula);
|
2021-11-30 08:59:04 +00:00
|
|
|
// But when the column is a formula column, empty formula expression is acceptable (it will
|
|
|
|
// convert column to empty column).
|
|
|
|
const trueFormula = column.formula.peek();
|
|
|
|
if (notBlank || trueFormula) { await gristDoc.convertToFormula(column.id.peek(), formula); }
|
|
|
|
// Clear state only when owner was not disposed
|
|
|
|
if (!owner.isDisposed()) {
|
|
|
|
clearState();
|
|
|
|
}
|
2021-11-05 10:25:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// Updates formula or convert column to trigger formula column if necessary.
|
2021-11-30 08:59:04 +00:00
|
|
|
const onSaveConvertToTrigger = async (column: ColumnRec, formula: string) => {
|
|
|
|
// If formula expression is not empty, and column was plain data column (without a formula)
|
|
|
|
if (formula && !column.hasTriggerFormula.peek()) {
|
|
|
|
// then convert column to a trigger formula column
|
|
|
|
await gristDoc.convertToTrigger(column.id.peek(), formula);
|
|
|
|
} else if (column.hasTriggerFormula.peek()) {
|
|
|
|
// else, if it was already a trigger formula column, just update formula.
|
|
|
|
await gristDoc.updateFormula(column.id.peek(), formula);
|
|
|
|
}
|
|
|
|
// Clear state only when owner was not disposed
|
|
|
|
if (!owner.isDisposed()) {
|
|
|
|
clearState();
|
2021-03-17 03:45:44 +00:00
|
|
|
}
|
2021-11-05 10:25:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
const errorMessage = createFormulaErrorObs(owner, gristDoc, origColumn);
|
|
|
|
// Helper that will create different flavors for formula builder.
|
2021-11-30 08:59:04 +00:00
|
|
|
const formulaBuilder = (onSave: SaveHandler) => [
|
2021-11-05 10:25:05 +00:00
|
|
|
cssRow(formulaField = buildFormula(
|
|
|
|
origColumn,
|
|
|
|
buildEditor,
|
|
|
|
"Enter formula",
|
|
|
|
onSave,
|
|
|
|
clearState)),
|
|
|
|
dom.maybe(errorMessage, errMsg => cssRow(cssError(errMsg), testId('field-error-count'))),
|
|
|
|
];
|
|
|
|
|
|
|
|
return dom.maybe(behavior, (type: BEHAVIOR) => [
|
|
|
|
cssLabel('COLUMN BEHAVIOR'),
|
|
|
|
...(type === "empty" ? [
|
|
|
|
menu(behaviourLabel(), [
|
2022-01-25 09:38:21 +00:00
|
|
|
convertToDataOption(),
|
2021-11-05 10:25:05 +00:00
|
|
|
]),
|
|
|
|
cssEmptySeparator(),
|
|
|
|
cssRow(textButton(
|
|
|
|
"Set formula",
|
|
|
|
dom.on("click", setFormula),
|
|
|
|
dom.prop("disabled", origColumn.disableModify),
|
|
|
|
testId("field-set-formula")
|
|
|
|
)),
|
|
|
|
cssRow(textButton(
|
|
|
|
"Set trigger formula",
|
|
|
|
dom.on("click", setTrigger),
|
2022-01-25 09:38:21 +00:00
|
|
|
dom.prop("disabled", use => use(isSummaryTable) || use(origColumn.disableModify)),
|
2021-11-05 10:25:05 +00:00
|
|
|
testId("field-set-trigger")
|
|
|
|
)),
|
|
|
|
cssRow(textButton(
|
|
|
|
"Make into data column",
|
|
|
|
dom.on("click", convertToData),
|
2022-01-25 09:38:21 +00:00
|
|
|
dom.prop("disabled", use => use(isSummaryTable) || use(origColumn.disableModify)),
|
2021-11-05 10:25:05 +00:00
|
|
|
testId("field-set-data")
|
|
|
|
))
|
|
|
|
] : type === "formula" ? [
|
|
|
|
menu(behaviourLabel(), [
|
|
|
|
convertToDataOption(),
|
|
|
|
clearAndResetOption(),
|
|
|
|
]),
|
|
|
|
formulaBuilder(onSaveConvertToFormula),
|
|
|
|
cssEmptySeparator(),
|
|
|
|
cssRow(textButton(
|
|
|
|
"Convert to trigger formula",
|
|
|
|
dom.on("click", convertFormulaToTrigger),
|
|
|
|
dom.hide(maybeFormula),
|
2022-01-25 09:38:21 +00:00
|
|
|
dom.prop("disabled", use => use(isSummaryTable) || use(origColumn.disableModify)),
|
2021-11-05 10:25:05 +00:00
|
|
|
testId("field-set-trigger")
|
|
|
|
))
|
|
|
|
] : /* type == 'data' */ [
|
|
|
|
menu(behaviourLabel(),
|
|
|
|
[
|
|
|
|
dom.domComputed(origColumn.hasTriggerFormula, (hasTrigger) => hasTrigger ?
|
|
|
|
// If we have trigger, we will convert it directly to a formula column
|
|
|
|
convertTriggerToFormulaOption() :
|
|
|
|
// else we will convert to empty column and open up the editor
|
|
|
|
convertDataColumnToFormulaOption()
|
|
|
|
),
|
|
|
|
clearAndResetOption(),
|
|
|
|
]
|
|
|
|
),
|
|
|
|
// If data column is or wants to be a trigger formula:
|
|
|
|
dom.maybe((use) => use(maybeTrigger) || use(origColumn.hasTriggerFormula), () => [
|
|
|
|
cssLabel('TRIGGER FORMULA'),
|
|
|
|
formulaBuilder(onSaveConvertToTrigger),
|
|
|
|
dom.create(buildFormulaTriggers, origColumn, maybeTrigger)
|
|
|
|
]),
|
|
|
|
// Else offer a way to convert to trigger formula.
|
|
|
|
dom.maybe((use) => !(use(maybeTrigger) || use(origColumn.hasTriggerFormula)), () => [
|
|
|
|
cssEmptySeparator(),
|
|
|
|
cssRow(textButton(
|
|
|
|
"Set trigger formula",
|
|
|
|
dom.on("click", convertDataColumnToTriggerColumn),
|
|
|
|
dom.prop("disabled", origColumn.disableModify),
|
|
|
|
testId("field-set-trigger")
|
|
|
|
))
|
|
|
|
])
|
|
|
|
])
|
|
|
|
]);
|
2021-03-17 03:45:44 +00:00
|
|
|
}
|
|
|
|
|
2021-11-05 10:25:05 +00:00
|
|
|
function buildFormula(
|
|
|
|
column: ColumnRec,
|
|
|
|
buildEditor: BuildEditor,
|
|
|
|
placeholder: string,
|
2021-11-30 08:59:04 +00:00
|
|
|
onSave?: SaveHandler,
|
2021-11-05 10:25:05 +00:00
|
|
|
onCancel?: () => void) {
|
2021-03-17 03:45:44 +00:00
|
|
|
return cssFieldFormula(column.formula, {placeholder, maxLines: 2},
|
|
|
|
dom.cls('formula_field_sidepane'),
|
|
|
|
cssFieldFormula.cls('-disabled', column.disableModify),
|
|
|
|
cssFieldFormula.cls('-disabled-icon', use => !use(column.formula)),
|
|
|
|
dom.cls('disabled'),
|
|
|
|
{tabIndex: '-1'},
|
2021-11-05 10:25:05 +00:00
|
|
|
// Focus event use used by a user to edit an existing formula.
|
|
|
|
// It can also be triggered manually to open up the editor.
|
|
|
|
dom.on('focus', (_, elem) => buildEditor(elem, undefined, onSave, onCancel)),
|
2021-03-17 03:45:44 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2022-03-22 13:41:11 +00:00
|
|
|
export const cssFieldFormula = styled(buildHighlightedCode, `
|
2021-03-17 03:45:44 +00:00
|
|
|
flex: auto;
|
|
|
|
cursor: pointer;
|
|
|
|
margin-top: 4px;
|
|
|
|
padding-left: 24px;
|
|
|
|
--icon-color: ${colors.lightGreen};
|
|
|
|
|
|
|
|
&-disabled-icon.formula_field_sidepane::before {
|
|
|
|
--icon-color: ${colors.slate};
|
|
|
|
}
|
|
|
|
&-disabled {
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
|
|
|
`);
|
|
|
|
|
|
|
|
const cssToggleButton = styled(cssIconButton, `
|
|
|
|
margin-left: 8px;
|
|
|
|
background-color: var(--grist-color-medium-grey-opaque);
|
|
|
|
box-shadow: inset 0 0 0 1px ${colors.darkGrey};
|
|
|
|
|
|
|
|
&-selected, &-selected:hover {
|
|
|
|
box-shadow: none;
|
|
|
|
background-color: ${colors.dark};
|
|
|
|
--icon-color: ${colors.light};
|
|
|
|
}
|
|
|
|
&-selected:hover {
|
|
|
|
--icon-color: ${colors.darkGrey};
|
|
|
|
}
|
2022-01-18 11:48:57 +00:00
|
|
|
&-disabled, &-disabled:hover {
|
|
|
|
--icon-color: ${colors.light};
|
|
|
|
background-color: var(--grist-color-medium-grey-opaque);
|
|
|
|
}
|
2021-03-17 03:45:44 +00:00
|
|
|
`);
|
|
|
|
|
|
|
|
const cssColLabelBlock = styled('div', `
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2021-12-03 16:59:05 +00:00
|
|
|
flex: auto;
|
|
|
|
min-width: 80px;
|
2021-03-17 03:45:44 +00:00
|
|
|
`);
|
|
|
|
|
|
|
|
const cssColTieBlock = styled('div', `
|
|
|
|
position: relative;
|
|
|
|
`);
|
|
|
|
|
|
|
|
const cssColTieConnectors = styled('div', `
|
|
|
|
position: absolute;
|
|
|
|
border: 2px solid var(--grist-color-dark-grey);
|
|
|
|
top: -9px;
|
|
|
|
bottom: -9px;
|
|
|
|
right: 11px;
|
|
|
|
left: 0px;
|
|
|
|
border-left: none;
|
|
|
|
z-index: -1;
|
|
|
|
`);
|
2022-08-08 13:32:50 +00:00
|
|
|
|
|
|
|
const cssEmptySeparator = styled('div', `
|
|
|
|
margin-top: 16px;
|
|
|
|
`);
|