Skip to content

Commit a9c962a

Browse files
Merge release/v3.1.2 into main branch (#1236)
1 parent 2685c42 commit a9c962a

File tree

22 files changed

+78
-50
lines changed

22 files changed

+78
-50
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@user-interviews/ui-design-system",
3-
"version": "3.1.1",
3+
"version": "3.1.2",
44
"dependencies": {
55
"@tiptap/core": "^2.3.1",
66
"@tiptap/extension-bold": "^2.3.1",

src/Avatar/Avatar.tsx

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,27 @@ type AvatarProps = {
1616
url?: string;
1717
};
1818

19-
function Avatar(props: AvatarProps) {
19+
function Avatar({
20+
ariaHidden,
21+
colorId,
22+
image,
23+
initials,
24+
large,
25+
name = '',
26+
showAlert,
27+
url,
28+
}: AvatarProps) {
2029
const [imageLoadFailed, setImageLoadFailed] = useState(false);
2130

2231
function onImageLoadError() {
2332
setImageLoadFailed(true);
2433
}
2534

2635
function wrapIfUrlPresent(content) {
27-
if (props.url) {
36+
if (url) {
2837
return (
2938
<a
30-
href={props.url}
39+
href={url}
3140
rel="noopener noreferrer"
3241
target="_blank"
3342
>
@@ -38,36 +47,36 @@ function Avatar(props: AvatarProps) {
3847
return content;
3948
}
4049

41-
const displayImage = props.image && !imageLoadFailed;
50+
const displayImage = image && !imageLoadFailed;
4251
const content = displayImage ? (
4352
<img
44-
alt={props.name}
45-
src={props.image}
53+
alt={name}
54+
src={image}
4655
onError={onImageLoadError}
4756
/>
4857
) : (
4958
<span className="Avatar__circle__initials">
50-
{props.initials}
59+
{initials}
5160
</span>
5261
);
5362

5463
return (
5564
<div
56-
aria-hidden={props.ariaHidden}
65+
aria-hidden={ariaHidden}
5766
className={classNames(
5867
'Avatar',
59-
{ 'Avatar--large': props.large },
68+
{ 'Avatar--large': large },
6069
)}
6170
>
6271
<div
6372
className={classNames([
6473
'Avatar__circle',
65-
{ [uiModClassName(props.colorId)]: !!props.colorId },
74+
{ [uiModClassName(colorId)]: !!colorId },
6675
])}
6776
>
6877
{wrapIfUrlPresent(content)}
6978
</div>
70-
{props.showAlert && (
79+
{showAlert && (
7180
<div className="Avatar__alert" />
7281
)}
7382
</div>

src/Container/Col.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export const Col = ({
6363
xl,
6464
xs,
6565
xxl,
66-
bsPrefix,
66+
bsPrefix = 'col',
6767
...props
6868
}: ColProps) => (
6969
<ReactBootstrapCol

src/Container/Container.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const Container = ({
2727
children,
2828
className,
2929
fluid,
30-
bsPrefix,
30+
bsPrefix = 'container',
3131
...props
3232
}: ContainerProps) => (
3333
<ReactBootstrapContainer

src/Container/Row.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export const Row = ({
6363
xl,
6464
xs,
6565
xxl,
66-
bsPrefix,
66+
bsPrefix = 'row',
6767
...props
6868
}: RowProps) => (
6969
<ReactBootstrapRow

src/CopyToClipboardButton/CopyToClipboardButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ type CopyToClipboardButtonProps = {
2424

2525
function CopyToClipboardButton({
2626
copyText = '',
27-
displayText = undefined,
27+
displayText,
2828
trackingEvent,
2929
variant = ButtonVariants.NEUTRAL,
3030
}: CopyToClipboardButtonProps) {

src/Drawer/Drawer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ type DrawerProps = {
3939

4040
const Drawer = ({
4141
behindNav = true,
42-
children = undefined,
42+
children,
4343
className = '',
4444
defaultExpanded = false,
4545
expandable = false,

src/Drawer/DrawerHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ type DrawerHeaderProps = {
1818
};
1919

2020
const DrawerHeader = ({
21-
bordered,
21+
bordered = true,
2222
title,
2323
onRequestClose,
2424
}: DrawerHeaderProps) => {

src/Dropdown/Dropdown.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,19 @@ type DropdownProps = {
6565
} & RBDropdownProps;
6666

6767
const Dropdown = ({
68-
align,
68+
align = 'start',
6969
as,
70-
autoClose,
70+
autoClose = true,
71+
bsPrefix = 'dropdown',
7172
children,
7273
className,
7374
drop,
7475
flip,
7576
focusFirstItemOnShow,
76-
navbar,
77+
navbar = false,
7778
onSelect,
7879
onToggle,
7980
show,
80-
bsPrefix,
8181
...props
8282
}: DropdownProps) => (
8383
<RBDropdown

src/Dropdown/DropdownDivider.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ type DropdownDividerProps = {
2121
};
2222

2323
const DropdownDivider = ({
24-
as,
25-
bsPrefix,
24+
as = 'hr',
25+
bsPrefix = 'dropdown',
2626
className,
2727
}: DropdownDividerProps) => (
2828
<RBDropdown.Divider

0 commit comments

Comments
 (0)