Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/Shared/Components/Button/Button.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ const Button = ({
icon = null,
ariaLabel = null,
showAriaLabelInTippy = true,
fullWidth = false,
...props
}: ButtonProps) => {
const isDisabled = disabled || isLoading
Expand Down Expand Up @@ -171,7 +172,7 @@ const Button = ({
<ButtonElement
{...props}
disabled={isDisabled}
className={`br-4 flex cursor dc__tab-focus dc__position-rel dc__capitalize ${getButtonDerivedClass({ size, variant, style, isLoading, icon })} ${isDisabled ? 'dc__disabled' : ''}`}
className={`br-4 flex cursor dc__tab-focus dc__position-rel dc__capitalize ${getButtonDerivedClass({ size, variant, style, isLoading, icon })} ${isDisabled ? 'dc__disabled' : ''} ${fullWidth ? 'w-100' : ''}`}
data-testid={dataTestId}
aria-label={ariaLabel}
>
Expand Down
6 changes: 6 additions & 0 deletions src/Shared/Components/Button/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ export type ButtonProps = (
* @default false
*/
disabled?: boolean
/**
* Determines if the button should expand to fill the full width of its container.
*
* @default false
*/
fullWidth?: boolean
} & (
| {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/Shared/Components/SelectPicker/common.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export const SelectPickerOption = <OptionValue, IsMulti extends boolean>({
disabled={isDisabled}
/>
)}
<div className={`flex left ${showDescription ? 'top' : ''} dc__gap-8`}>
<div className={`flex left w-100 ${showDescription ? 'top' : ''} dc__gap-8`}>
{startIcon && (
<div className="dc__no-shrink icon-dim-20 flex dc__fill-available-space">{startIcon}</div>
)}
Expand Down