mirror of
https://github.com/ToolJet/ToolJet
synced 2026-04-21 13:37:28 +00:00
fix(file-button): update default icon and fix section categorization
- Change default icon of FileButton component from IconHome2 to IconFileUpload for better UX - Set iconVisibility to true by default for FileButton - Add FileButton to Miscellaneous section in component library - Replace ButtonGroup with ButtonGroupV2 in Buttons section in component library
This commit is contained in:
parent
69c9506793
commit
4eab26bc8d
4 changed files with 7 additions and 6 deletions
|
|
@ -5,7 +5,7 @@ const sectionConfig = {
|
|||
},
|
||||
buttons: {
|
||||
title: 'Buttons',
|
||||
valueSet: new Set(['Button', 'ButtonGroup', 'PopoverMenu', 'FileButton']),
|
||||
valueSet: new Set(['Button', 'ButtonGroupV2', 'PopoverMenu', 'FileButton']),
|
||||
},
|
||||
data: {
|
||||
title: 'Data',
|
||||
|
|
@ -71,6 +71,7 @@ const sectionConfig = {
|
|||
title: 'Miscellaneous',
|
||||
valueSet: new Set([
|
||||
'FilePicker',
|
||||
'FileButton',
|
||||
'CodeEditor',
|
||||
'ColorPicker',
|
||||
'BoundedBox',
|
||||
|
|
|
|||
|
|
@ -329,8 +329,8 @@ export const fileButtonConfig = {
|
|||
labelSize: { value: '14' },
|
||||
labelWeight: { value: 'medium' },
|
||||
labelColor: { value: 'var(--cc-surface1-surface)' },
|
||||
icon: { value: 'IconHome2' },
|
||||
iconVisibility: { value: false },
|
||||
icon: { value: 'IconFileUpload' },
|
||||
iconVisibility: { value: true },
|
||||
iconColor: { value: 'var(--cc-surface1-surface)' },
|
||||
iconDirection: { value: 'left' },
|
||||
loaderColor: { value: 'var(--cc-surface1-surface)' },
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ export const FileButton = (props) => {
|
|||
{iconVisibility && <TablerIcon iconName={icon} size={16} color={computedIconColor} />}
|
||||
<span
|
||||
className={clsx(
|
||||
'tw-flex tw-items-center tw-gap-1.5 tw-flex-1 tw-min-w-0 tw-overflow-hidden',
|
||||
'tw-flex tw-items-center tw-gap-1.5 tw-min-w-0 tw-overflow-hidden',
|
||||
justifyClass[contentAlignment] ?? 'tw-justify-start'
|
||||
)}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -333,8 +333,8 @@ export const fileButtonConfig = {
|
|||
labelSize: { value: '14' },
|
||||
labelWeight: { value: 'medium' },
|
||||
labelColor: { value: 'var(--cc-surface1-surface)' },
|
||||
icon: { value: 'IconHome2' },
|
||||
iconVisibility: { value: false },
|
||||
icon: { value: 'IconFileUpload' },
|
||||
iconVisibility: { value: true },
|
||||
iconColor: { value: 'var(--cc-surface1-surface)' },
|
||||
iconDirection: { value: 'left' },
|
||||
loaderColor: { value: 'var(--cc-surface1-surface)' },
|
||||
|
|
|
|||
Loading…
Reference in a new issue