add text alignment option to dropdown (#2406)

This commit is contained in:
Maurits Lourens 2022-03-04 08:25:56 +01:00 committed by GitHub
parent 4ff45bf024
commit 6547f862e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -14,7 +14,7 @@ export const DropDown = function DropDown({
component,
}) {
let { label, value, display_values, values } = properties;
const { selectedTextColor, borderRadius, visibility, disabledState } = styles;
const { selectedTextColor, borderRadius, visibility, disabledState, justifyContent } = styles;
const [currentValue, setCurrentValue] = useState(() => value);
if (!_.isArray(values)) {
@ -81,6 +81,7 @@ export const DropDown = function DropDown({
...provided,
height: height,
padding: '0 6px',
justifyContent,
}),
singleValue: (provided, _state) => ({
@ -117,6 +118,7 @@ export const DropDown = function DropDown({
};
return {
...provided,
justifyContent,
height: 'auto',
display: 'flex',
flexDirection: 'rows',

View file

@ -900,6 +900,7 @@ export const componentTypes = [
visibility: { type: 'toggle', displayName: 'Visibility' },
selectedTextColor: { type: 'color', displayName: 'Selected Text Color' },
disabledState: { type: 'toggle', displayName: 'Disable' },
justifyContent: { type: 'alignButtons', displayName: 'Align Text' },
},
exposedVariables: {
value: null,