updated Descriptionelement styles
This commit is contained in:
parent
d3644125db
commit
df0594f59f
@ -97,6 +97,10 @@ class Ui_elementsDBApi extends GenericDBApi {
|
|||||||
descriptionText: '',
|
descriptionText: '',
|
||||||
descriptionTitleFontSize: '48px',
|
descriptionTitleFontSize: '48px',
|
||||||
descriptionTextFontSize: '36px',
|
descriptionTextFontSize: '36px',
|
||||||
|
descriptionTitleFontFamily: 'inherit',
|
||||||
|
descriptionTextFontFamily: 'inherit',
|
||||||
|
descriptionTitleColor: '#000000',
|
||||||
|
descriptionTextColor: '#4B5563',
|
||||||
descriptionBackgroundColor: 'transparent',
|
descriptionBackgroundColor: 'transparent',
|
||||||
appearDelaySec: 0,
|
appearDelaySec: 0,
|
||||||
appearDurationSec: null,
|
appearDurationSec: null,
|
||||||
|
|||||||
@ -121,6 +121,10 @@ type CanvasElement = {
|
|||||||
descriptionText?: string;
|
descriptionText?: string;
|
||||||
descriptionTitleFontSize?: string;
|
descriptionTitleFontSize?: string;
|
||||||
descriptionTextFontSize?: string;
|
descriptionTextFontSize?: string;
|
||||||
|
descriptionTitleFontFamily?: string;
|
||||||
|
descriptionTextFontFamily?: string;
|
||||||
|
descriptionTitleColor?: string;
|
||||||
|
descriptionTextColor?: string;
|
||||||
descriptionBackgroundColor?: string;
|
descriptionBackgroundColor?: string;
|
||||||
navLabel?: string;
|
navLabel?: string;
|
||||||
navType?: NavigationButtonKind;
|
navType?: NavigationButtonKind;
|
||||||
@ -488,6 +492,10 @@ const createDefaultElement = (
|
|||||||
descriptionText: '',
|
descriptionText: '',
|
||||||
descriptionTitleFontSize: '48px',
|
descriptionTitleFontSize: '48px',
|
||||||
descriptionTextFontSize: '36px',
|
descriptionTextFontSize: '36px',
|
||||||
|
descriptionTitleFontFamily: 'inherit',
|
||||||
|
descriptionTextFontFamily: 'inherit',
|
||||||
|
descriptionTitleColor: '#000000',
|
||||||
|
descriptionTextColor: '#4B5563',
|
||||||
descriptionBackgroundColor: 'transparent',
|
descriptionBackgroundColor: 'transparent',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -2119,17 +2127,21 @@ const ConstructorPage = ({ mode = 'constructor' }: ConstructorPageProps) => {
|
|||||||
fontSize: element.descriptionTitleFontSize
|
fontSize: element.descriptionTitleFontSize
|
||||||
? `calc(${element.descriptionTitleFontSize} * 0.25)`
|
? `calc(${element.descriptionTitleFontSize} * 0.25)`
|
||||||
: '12px',
|
: '12px',
|
||||||
|
fontFamily: element.descriptionTitleFontFamily || 'inherit',
|
||||||
|
color: element.descriptionTitleColor || '#000000',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{element.descriptionTitle || 'TITLE'}
|
{element.descriptionTitle || 'TITLE'}
|
||||||
</p>
|
</p>
|
||||||
{element.descriptionText && (
|
{element.descriptionText && (
|
||||||
<p
|
<p
|
||||||
className='text-gray-600 line-clamp-4'
|
className='line-clamp-4'
|
||||||
style={{
|
style={{
|
||||||
fontSize: element.descriptionTextFontSize
|
fontSize: element.descriptionTextFontSize
|
||||||
? `calc(${element.descriptionTextFontSize} * 0.25)`
|
? `calc(${element.descriptionTextFontSize} * 0.25)`
|
||||||
: '9px',
|
: '9px',
|
||||||
|
fontFamily: element.descriptionTextFontFamily || 'inherit',
|
||||||
|
color: element.descriptionTextColor || '#4B5563',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{element.descriptionText}
|
{element.descriptionText}
|
||||||
@ -3486,6 +3498,66 @@ const ConstructorPage = ({ mode = 'constructor' }: ConstructorPageProps) => {
|
|||||||
placeholder='e.g. 36px'
|
placeholder='e.g. 36px'
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<label className='mb-1 block text-[11px] font-semibold text-gray-600'>
|
||||||
|
Title font family
|
||||||
|
</label>
|
||||||
|
<input
|
||||||
|
className='w-full rounded border border-gray-300 px-2 py-1 text-xs'
|
||||||
|
value={selectedElement.descriptionTitleFontFamily || 'inherit'}
|
||||||
|
onChange={(event) =>
|
||||||
|
updateSelectedElement({
|
||||||
|
descriptionTitleFontFamily: event.target.value,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
placeholder='e.g. Arial, Helvetica, sans-serif'
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label className='mb-1 block text-[11px] font-semibold text-gray-600'>
|
||||||
|
Text font family
|
||||||
|
</label>
|
||||||
|
<input
|
||||||
|
className='w-full rounded border border-gray-300 px-2 py-1 text-xs'
|
||||||
|
value={selectedElement.descriptionTextFontFamily || 'inherit'}
|
||||||
|
onChange={(event) =>
|
||||||
|
updateSelectedElement({
|
||||||
|
descriptionTextFontFamily: event.target.value,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
placeholder='e.g. Arial, Helvetica, sans-serif'
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label className='mb-1 block text-[11px] font-semibold text-gray-600'>
|
||||||
|
Title color
|
||||||
|
</label>
|
||||||
|
<input
|
||||||
|
type='color'
|
||||||
|
className='w-full h-8 rounded border border-gray-300 px-1 py-1'
|
||||||
|
value={selectedElement.descriptionTitleColor || '#000000'}
|
||||||
|
onChange={(event) =>
|
||||||
|
updateSelectedElement({
|
||||||
|
descriptionTitleColor: event.target.value,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label className='mb-1 block text-[11px] font-semibold text-gray-600'>
|
||||||
|
Text color
|
||||||
|
</label>
|
||||||
|
<input
|
||||||
|
type='color'
|
||||||
|
className='w-full h-8 rounded border border-gray-300 px-1 py-1'
|
||||||
|
value={selectedElement.descriptionTextColor || '#4B5563'}
|
||||||
|
onChange={(event) =>
|
||||||
|
updateSelectedElement({
|
||||||
|
descriptionTextColor: event.target.value,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label className='mb-1 block text-[11px] font-semibold text-gray-600'>
|
<label className='mb-1 block text-[11px] font-semibold text-gray-600'>
|
||||||
Background color
|
Background color
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user