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
2 changes: 1 addition & 1 deletion skills/carbon-react/components/portrait.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ description: Carbon Portrait component props and usage examples.
value={variant}
>
{availableVariants.map(({ label, value }) => (
<Option text={label} value={value} />
<Option key={value} text={label} value={value} />
))}
</Select>
</Box>
Expand Down
27 changes: 17 additions & 10 deletions src/components/file-input/file-input-test.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,23 @@ export const AllStatuses = (args: Partial<FileInputProps>) => {
message: "oops, that's not right",
},
];
return statuses.map((status) => (
<FileInput
my={20}
label="test"
inputHint="hint"
uploadStatus={status}
onChange={() => {}}
{...args}
/>
));
return statuses.map((status, index) => {
const statusType = Array.isArray(status)
? "multiple"
: (status?.status ?? "none");

return (
<FileInput
key={`status-${statusType}-${index}`}
my={20}
label="test"
inputHint="hint"
uploadStatus={status}
onChange={() => {}}
{...args}
/>
);
});
};

export const LongFilenameStatus = (args: Partial<FileInputProps>) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/form/form.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export const Form = ({
$hasFooterChildren={!!footerChildren}
$stickyFooter={stickyFooter}
{...(stickyFooter && { $stickyFooterVariant: stickyFooterVariant })}
disableStickyOnSmallScreen={disableStickyOnSmallScreen}
$disableStickyOnSmallScreen={disableStickyOnSmallScreen}
$buttonAlignment={buttonAlignment}
$fullWidthButtons={fullWidthButtons}
{...footerPadding}
Expand Down
6 changes: 3 additions & 3 deletions src/components/form/form.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ interface StyledFormFooterProps {
$stickyFooterVariant?: "light" | "grey";
$fullWidthButtons?: boolean;
$buttonAlignment?: FormButtonAlignment;
disableStickyOnSmallScreen?: boolean;
$disableStickyOnSmallScreen?: boolean;
}

export const StyledFormFooter = styled.div.attrs(
Expand Down Expand Up @@ -104,8 +104,8 @@ export const StyledFormFooter = styled.div.attrs(

${padding}

${({ disableStickyOnSmallScreen }) =>
disableStickyOnSmallScreen &&
${({ $disableStickyOnSmallScreen }) =>
$disableStickyOnSmallScreen &&
css`
@media screen and (max-width: 600px) {
position: static;
Expand Down
2 changes: 1 addition & 1 deletion src/components/menu/menu-test.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ MenuFullScreenKeysTest.storyName = "Menu Fullscreen with dynamic submenus";
export const MenuWithSubmenuCustomPadding = () => (
<>
{[0, "5px", 1, 2, "17px", 3, 4, 5, 6, 7, 8].map((padding) => (
<Menu>
<Menu key={`menu-padding-${padding}`}>
<MenuItem px={padding} href="#">
Item One
</MenuItem>
Expand Down
3 changes: 3 additions & 0 deletions src/components/password/password.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@ export const Password = ({
id,
disabled,
forceObscurity = false,
characterLimit,
inputIcon,
size,
...rest
}: PasswordProps) => {
void characterLimit;

const internalInputId = useRef(id || guid());
const l = useLocale();

Expand Down
2 changes: 1 addition & 1 deletion src/components/portrait/portrait.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ export const Variants: Story = () => {
value={variant}
>
{availableVariants.map(({ label, value }) => (
<Option text={label} value={value} />
<Option key={value} text={label} value={value} />
))}
</Select>
</Box>
Expand Down
13 changes: 7 additions & 6 deletions src/components/tile/tile-test.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,25 +65,26 @@ export const DefaultStory = ({
...args
}: TileProps & TileStoryProps) => {
const contentOneProps = {
key: "one",
children: contentOneChildren,
width: contentOneWidth,
};
const contentTwoProps = {
key: "two",
children: contentTwoChildren,
width: contentTwoWidth,
};
const contentThreeProps = {
key: "three",
children: contentThreeChildren,
width: contentThreeWidth,
};
const tileContent = [
contentOneProps.children ? <TileContent {...contentOneProps} /> : undefined,
contentTwoProps.children ? <TileContent {...contentTwoProps} /> : undefined,
contentOneProps.children ? (
<TileContent key="one" {...contentOneProps} />
) : undefined,
contentTwoProps.children ? (
<TileContent key="two" {...contentTwoProps} />
) : undefined,
contentThreeProps.children ? (
<TileContent {...contentThreeProps} />
<TileContent key="three" {...contentThreeProps} />
) : undefined,
];
return (
Expand Down
Loading