New icons, better page transition, truncated popper, adds disallowSpaces option to binders, delete and edit buttons
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { FC, useCallback } from 'react'
|
||||
import { FieldType, FieldTypes, Schema, TypeType, fieldTypesWithValues } from '../../types/schema'
|
||||
import { Truncate } from '../Poppables/truncation';
|
||||
|
||||
interface IProps {
|
||||
schema: Schema;
|
||||
@@ -16,6 +17,7 @@ export const SchemaViewer: FC<IProps> = ({ schema, onTypeClick }) => {
|
||||
switch (field.type) {
|
||||
case FieldTypes.type: return 'Type:'
|
||||
case FieldTypes.dice: return 'Dice:'
|
||||
case FieldTypes.select: return 'Options:'
|
||||
default: return '';
|
||||
}
|
||||
}, [])
|
||||
@@ -53,7 +55,7 @@ export const SchemaViewer: FC<IProps> = ({ schema, onTypeClick }) => {
|
||||
<p className="font-bold">{fieldKey}</p>
|
||||
<p className="font-thin capitalize text-xs">{field.type}</p>
|
||||
<p className="font-thin capitalize text-xs">Maximum entries: {field.limit === 0 ? 'unlimited ' : field.limit}</p>
|
||||
{(field.isConstant || fieldTypesWithValues.includes(field.type)) && <p className="font-thin capitalize text-xs">{createValueLable(field)} {field.value}</p>}
|
||||
{(field.isConstant || fieldTypesWithValues.includes(field.type)) && <p className="font-thin capitalize text-xs">{createValueLable(field)} <Truncate>{field.value}</Truncate></p>}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user