Invite users role dropdown size. Drag friction. icon button background
This commit is contained in:
parent
75edd7c85d
commit
120ef8b8a8
|
|
@ -9,6 +9,7 @@ import { useSpring, animated, interpolate, config } from "react-spring";
|
||||||
const SPRING_CONFIG = {
|
const SPRING_CONFIG = {
|
||||||
...config.gentle,
|
...config.gentle,
|
||||||
clamp: true,
|
clamp: true,
|
||||||
|
friction: 5,
|
||||||
};
|
};
|
||||||
const DropZoneWrapper = styled.div<{ width: number; height: number }>`
|
const DropZoneWrapper = styled.div<{ width: number; height: number }>`
|
||||||
width: ${props => props.width}px;
|
width: ${props => props.width}px;
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ type SelectComponentProps = {
|
||||||
};
|
};
|
||||||
options?: Array<{ id: string; name: string }>;
|
options?: Array<{ id: string; name: string }>;
|
||||||
placeholder?: string;
|
placeholder?: string;
|
||||||
|
size?: "large" | "small";
|
||||||
};
|
};
|
||||||
|
|
||||||
export const SelectComponent = (props: SelectComponentProps) => {
|
export const SelectComponent = (props: SelectComponentProps) => {
|
||||||
|
|
@ -34,6 +35,7 @@ export const SelectComponent = (props: SelectComponentProps) => {
|
||||||
.name
|
.name
|
||||||
: props.placeholder,
|
: props.placeholder,
|
||||||
outline: true,
|
outline: true,
|
||||||
|
size: props.size,
|
||||||
},
|
},
|
||||||
openDirection: "down",
|
openDirection: "down",
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ type SelectFieldProps = {
|
||||||
name: string;
|
name: string;
|
||||||
placeholder?: string;
|
placeholder?: string;
|
||||||
options?: Array<{ id: string; name: string; value?: string }>;
|
options?: Array<{ id: string; name: string; value?: string }>;
|
||||||
|
size?: "large" | "small";
|
||||||
};
|
};
|
||||||
|
|
||||||
export const SelectField = (props: SelectFieldProps) => {
|
export const SelectField = (props: SelectFieldProps) => {
|
||||||
|
|
@ -36,6 +37,7 @@ export const SelectField = (props: SelectFieldProps) => {
|
||||||
placeholder={props.placeholder}
|
placeholder={props.placeholder}
|
||||||
component={renderComponent}
|
component={renderComponent}
|
||||||
options={props.options}
|
options={props.options}
|
||||||
|
size={props.size}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ div.bp3-popover-arrow {
|
||||||
cursor: default !important;
|
cursor: default !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bp3-intent-primary, input:checked ~ span.bp3-control-indicator {
|
.bp3-intent-primary:not(.bp3-icon), input:checked ~ span.bp3-control-indicator {
|
||||||
background: #29CCA3 !important;
|
background: #29CCA3 !important;
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ export type CustomizedDropdownProps = {
|
||||||
sections: CustomizedDropdownOptionSection[];
|
sections: CustomizedDropdownOptionSection[];
|
||||||
trigger: ButtonProps & {
|
trigger: ButtonProps & {
|
||||||
content?: ReactNode;
|
content?: ReactNode;
|
||||||
|
size?: "large" | "small";
|
||||||
};
|
};
|
||||||
openDirection: Direction;
|
openDirection: Direction;
|
||||||
openOnHover?: boolean;
|
openOnHover?: boolean;
|
||||||
|
|
@ -84,6 +85,7 @@ export const CustomizedDropdown = (
|
||||||
<Button
|
<Button
|
||||||
outline={props.trigger.outline}
|
outline={props.trigger.outline}
|
||||||
filled={props.trigger.filled}
|
filled={props.trigger.filled}
|
||||||
|
size={props.trigger.size}
|
||||||
icon={getDirectionBased.ICON_NAME(props.openDirection) as IconName}
|
icon={getDirectionBased.ICON_NAME(props.openDirection) as IconName}
|
||||||
iconAlignment={Directions.RIGHT}
|
iconAlignment={Directions.RIGHT}
|
||||||
text={props.trigger.text}
|
text={props.trigger.text}
|
||||||
|
|
|
||||||
|
|
@ -134,6 +134,7 @@ const renderInviteUsersByRoleForm = (
|
||||||
name={`${field}.role`}
|
name={`${field}.role`}
|
||||||
placeholder={INVITE_USERS_ROLE_SELECT_PLACEHOLDER}
|
placeholder={INVITE_USERS_ROLE_SELECT_PLACEHOLDER}
|
||||||
options={roles}
|
options={roles}
|
||||||
|
size="large"
|
||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user